diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-06-15 00:55:40 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-06-15 00:55:40 +0000 |
commit | fcd783d583d270b7ec1ec3e0fcf83cd93d30e381 (patch) | |
tree | 79bd45078d4538ab8ed1c1a335f0bb3441eb8a41 /lib/Frontend/AnalysisConsumer.cpp | |
parent | 99e14a04887570b11df90daf2e8a7adf84599b01 (diff) |
Change AnalysisConsumer to analyze functions created by instantiantiating a macro. Fixes PR 7361.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/AnalysisConsumer.cpp')
-rw-r--r-- | lib/Frontend/AnalysisConsumer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index 6a4727929e..0589008033 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -278,8 +278,9 @@ void AnalysisConsumer::HandleCode(Decl *D, Stmt* Body, Actions& actions) { // Don't run the actions on declarations in header files unless // otherwise specified. - if (!Opts.AnalyzeAll && - !Ctx->getSourceManager().isFromMainFile(D->getLocation())) + SourceManager &SM = Ctx->getSourceManager(); + SourceLocation SL = SM.getInstantiationLoc(D->getLocation()); + if (!Opts.AnalyzeAll && !SM.isFromMainFile(SL)) return; // Clear the AnalysisManager of old AnalysisContexts. |