diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-01-26 01:12:17 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-01-26 01:12:17 +0000 |
commit | 145abde152ec206aa6857cfed2b6dd785c395cc8 (patch) | |
tree | f146acc6c640baf4d48b58fbb766cdb2f14752ba /clang/lib/AST/Decl.cpp | |
parent | ff33e3636d26b165048e333f1d55a9d3088d4bf3 (diff) | |
download | bcm5719-llvm-145abde152ec206aa6857cfed2b6dd785c395cc8.tar.gz bcm5719-llvm-145abde152ec206aa6857cfed2b6dd785c395cc8.zip |
[MS Compat] Don't crash if __GetExceptionInfo is in global scope
__GetExceptionInfo triggered Sema::LazilyCreateBuiltin which tries to
create a non-templated function decl. This is unnecessary and
ill-advised, there is no need for us to create a declaration for such a
builtin.
This fixes PR26298.
llvm-svn: 258762
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 427ca5efcd6..ce1b9fac554 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -2708,8 +2708,7 @@ unsigned FunctionDecl::getBuiltinID() const { // declaration, for instance "extern "C" { namespace std { decl } }". if (!LinkageDecl) { if (BuiltinID == Builtin::BI__GetExceptionInfo && - Context.getTargetInfo().getCXXABI().isMicrosoft() && - isInStdNamespace()) + Context.getTargetInfo().getCXXABI().isMicrosoft()) return Builtin::BI__GetExceptionInfo; return 0; } |