[cfe-commits] r65862 - /cfe/trunk/include/clang/Analysis/PathDiagnostic.h
Ted Kremenek
kremenek at apple.com
Mon Mar 2 11:40:38 PST 2009
Author: kremenek
Date: Mon Mar 2 13:40:38 2009
New Revision: 65862
URL: http://llvm.org/viewvc/llvm-project?rev=65862&view=rev
Log:
Add a 'kind' field to PathDiagnosticPieces.
Modified:
cfe/trunk/include/clang/Analysis/PathDiagnostic.h
Modified: cfe/trunk/include/clang/Analysis/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathDiagnostic.h?rev=65862&r1=65861&r2=65862&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/PathDiagnostic.h Mon Mar 2 13:40:38 2009
@@ -26,30 +26,34 @@
class PathDiagnosticPiece {
public:
+ enum Kind { ControlFlow, Event };
enum DisplayHint { Above, Below };
private:
const FullSourceLoc Pos;
const std::string str;
std::vector<CodeModificationHint> CodeModificationHints;
+ const Kind kind;
const DisplayHint Hint;
std::vector<SourceRange> ranges;
public:
PathDiagnosticPiece(FullSourceLoc pos, const std::string& s,
+ Kind k = Event,
DisplayHint hint = Above);
PathDiagnosticPiece(FullSourceLoc pos, const char* s,
+ Kind k = Event,
DisplayHint hint = Above);
const std::string& getString() const { return str; }
DisplayHint getDisplayHint() const { return Hint; }
- void addRange(SourceRange R) {
- ranges.push_back(R);
- }
+ Kind getKind() const { return kind; }
+
+ void addRange(SourceRange R) { ranges.push_back(R); }
void addRange(SourceLocation B, SourceLocation E) {
ranges.push_back(SourceRange(B,E));
More information about the cfe-commits
mailing list