summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-11-14 00:37:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-11-14 00:37:55 +0000
commit6403e937d65dbd3c48ff52f1df6eb579f76d53e6 (patch)
tree8b5742ce3adb89dce49f19144294716dcccec416 /clang/lib/Parse/ParseDecl.cpp
parent283bc2ed28f423c29ab57a2b491d2ebdb53a4b12 (diff)
downloadbcm5719-llvm-6403e937d65dbd3c48ff52f1df6eb579f76d53e6.tar.gz
bcm5719-llvm-6403e937d65dbd3c48ff52f1df6eb579f76d53e6.zip
PR21565 Add an egregious hack to support broken libstdc++ headers that declare
a member named 'swap' and then expect unqualified lookup for the name 'swap' in its exception specification to find anything else. Without delay-parsed exception specifications, this was ill-formed (NDR) by [basic.scope.class]p1, rule 2. With delay-parsed exception specifications, the call to 'swap' unambiguously finds the function being declared, which then fails because the arguments don't work for that function. llvm-svn: 221955
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 8fbe7833a1f..2e30c52df93 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -5281,7 +5281,8 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
// Parse exception-specification[opt].
bool Delayed = D.isFirstDeclarationOfMember() &&
- D.isFunctionDeclaratorAFunctionDeclaration();
+ D.isFunctionDeclaratorAFunctionDeclaration() &&
+ !Actions.isLibstdcxxEagerExceptionSpecHack(D);
ESpecType = tryParseExceptionSpecification(Delayed,
ESpecRange,
DynamicExceptions,
OpenPOWER on IntegriCloud