[cfe-commits] r140180 - /cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
Anna Zaks
ganna at apple.com
Tue Sep 20 14:25:00 PDT 2011
Author: zaks
Date: Tue Sep 20 16:25:00 2011
New Revision: 140180
URL: http://llvm.org/viewvc/llvm-project?rev=140180&view=rev
Log:
[analyzer] Refactor PathDiagnosticLocation: Use the pre-computed Range and Location for profile.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp?rev=140180&r1=140179&r2=140180&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp Tue Sep 20 16:25:00 2011
@@ -351,22 +351,9 @@
//===----------------------------------------------------------------------===//
void PathDiagnosticLocation::Profile(llvm::FoldingSetNodeID &ID) const {
- ID.AddInteger((unsigned) K);
- switch (K) {
- case RangeK:
- ID.AddInteger(R.getBegin().getRawEncoding());
- ID.AddInteger(R.getEnd().getRawEncoding());
- break;
- case SingleLocK:
- ID.AddInteger(R.getBegin().getRawEncoding());
- break;
- case StmtK:
- ID.Add(S);
- break;
- case DeclK:
- ID.Add(D);
- break;
- }
+ ID.AddInteger(Range.getBegin().getRawEncoding());
+ ID.AddInteger(Range.getEnd().getRawEncoding());
+ ID.AddInteger(Loc.getRawEncoding());
return;
}
More information about the cfe-commits
mailing list