summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-19 16:47:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-19 16:47:56 +0000
commit0286b467027756abe8749949c5f998c6004345e3 (patch)
treead9cac0c77333c6ff063f7dd61d8c7abe3484c44 /clang/lib
parent337caf9e3e19444a658db6febd1ff697febaa745 (diff)
downloadbcm5719-llvm-0286b467027756abe8749949c5f998c6004345e3.tar.gz
bcm5719-llvm-0286b467027756abe8749949c5f998c6004345e3.zip
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>. llvm-svn: 96679
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 8aa69363bee..62b10a316e6 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud