aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExceptionSpec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-16 03:56:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-16 03:56:14 +0000
commitd1420c6fa788669e49f21e184927c7833881e399 (patch)
tree576ecf37eb90705275b070da53e7cfa2acb7da77 /lib/Sema/SemaExceptionSpec.cpp
parent0dae729a69c4fccc38c97d5dd44f7b20bb20de1c (diff)
Store SourceManager pointer on PrintingPolicy in the case where we're dumping,
and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp
index 63bfa9dc2d..e6266fb086 100644
--- a/lib/Sema/SemaExceptionSpec.cpp
+++ b/lib/Sema/SemaExceptionSpec.cpp
@@ -242,8 +242,7 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {
case EST_ComputedNoexcept:
OS << "noexcept(";
- OldProto->getNoexceptExpr()->printPretty(OS, Context, 0,
- getPrintingPolicy());
+ OldProto->getNoexceptExpr()->printPretty(OS, 0, getPrintingPolicy());
OS << ")";
break;