------------------------------------------------------------------------
r260370 | abataev | 2016-02-10 02:50:12 -0800 (Wed, 10 Feb 2016) | 1 line
Fix PR26543: add a check for definition in CXXRecordDecl.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_38@261002
91177308-0d34-0410-b5e6-
96231b3b80d8
if (auto *CTD = CTSD->getSpecializedTemplate())
RD = CTD->getTemplatedDecl();
if (IsConstant &&
- !(SemaRef.getLangOpts().CPlusPlus && RD && RD->hasMutableFields())) {
+ !(SemaRef.getLangOpts().CPlusPlus && RD && RD->hasDefinition() &&
+ RD->hasMutableFields())) {
// Variables with const-qualified type having no mutable member may be
// listed in a firstprivate clause, even if they are static data members.
DSAVarData DVarTemp = hasDSA(D, MatchesAnyClause(OMPC_firstprivate),
#pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma omp parallel'}}
+struct S;
+S& bar();
int main(int argc, char **argv) {
+ S &s = bar();
+ #pragma omp parallel
+ (void)&s;
#pragma omp parallel { // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
foo();
#pragma omp parallel ( // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}