]> granicus.if.org Git - clang/commit
Introduce a new PresumedLoc class to represent the concept of a location
authorChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2009 07:57:44 +0000 (07:57 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2009 07:57:44 +0000 (07:57 +0000)
commitb9c3f966b103f7cfe8e5e60007c4c8b38f7298eb
treed10a3e7c028ae1ae13bef1b61f7da4aff02ef207
parent52c29081281955d3db9e11d10573b2d38f709099
Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line.  This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
  that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
  simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
Driver/AnalysisConsumer.cpp
Driver/DependencyFile.cpp
Driver/PrintPreprocessedOutput.cpp
include/clang/Basic/SourceLocation.h
include/clang/Basic/SourceManager.h
include/clang/Driver/TextDiagnosticPrinter.h
lib/AST/StmtDumper.cpp
lib/Analysis/LiveVariables.cpp
lib/Basic/SourceLocation.cpp
lib/Basic/SourceManager.cpp
lib/Driver/TextDiagnosticPrinter.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Lex/Preprocessor.cpp
test/Preprocessor/dumptokens_phyloc.c