Track the result of evaluating a computed noexcept specification on the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 3 May 2018 03:58:32 +0000 (03:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 3 May 2018 03:58:32 +0000 (03:58 +0000)
commiteaf11ad70904679593d3c7c100bcbcc395c91a89
tree257b3b16ed8dd6c92f949e57987c29e3741a169b
parent58fce7e54b50af99023b34a24992fc881ace77b6
Track the result of evaluating a computed noexcept specification on the
FunctionProtoType.

We previously re-evaluated the expression each time we wanted to know whether
the type is noexcept or not. We now evaluate the expression exactly once.

This is not quite "no functional change": it fixes a crasher bug during AST
deserialization where we would try to evaluate the noexcept specification in a
situation where we have not deserialized sufficient portions of the AST to
permit such evaluation.

llvm-svn: 331428
33 files changed:
clang/include/clang/AST/Type.h
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/include/clang/Basic/ExceptionSpecificationType.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ASTStructuralEquivalence.cpp
clang/lib/AST/DeclPrinter.cpp
clang/lib/AST/ExprCXX.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/Type.cpp
clang/lib/AST/TypePrinter.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGException.cpp
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Sema/AnalysisBasedWarnings.cpp
clang/lib/Sema/DeclSpec.cpp
clang/lib/Sema/SemaChecking.cpp
clang/lib/Sema/SemaCoroutine.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExceptionSpec.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Modules/cxx17-exception-spec.cpp [new file with mode: 0644]