diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-19 16:47:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-19 16:47:56 +0000 |
commit | 3c3aaf9bdff81af40212e9a1ac517ad7c793d5cc (patch) | |
tree | fa58612a8cdcbd363d1953ad261312a301dcbc7a /lib/Parse/ParseDecl.cpp | |
parent | 36262b81559cfce4f67256d052e4fed343a02861 (diff) |
Only parse C++0x attribute specifiers in declarators when in C++0x
mode. This allows us to detect invalid VLAs in Objective-C++
mode. This should be the last of <rdar://problem/7660386>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 8aa69363be..62b10a316e 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -2588,7 +2588,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { "Haven't past the location of the identifier yet?"); // Don't parse attributes unless we have an identifier. - if (D.getIdentifier() && getLang().CPlusPlus + if (D.getIdentifier() && getLang().CPlusPlus0x && isCXX0XAttributeSpecifier(true)) { SourceLocation AttrEndLoc; CXX0XAttributeList Attr = ParseCXX0XAttributes(); |