diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-05-15 18:53:42 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-05-15 18:53:42 +0000 |
| commit | 9d73cabf22b970ec47eaae9b01ca55430f426618 (patch) | |
| tree | 8e5c9800342159075873a353429e0c63672a0f62 /clang/lib/Frontend | |
| parent | a3d4d7b4fa31f38ffb9f7709de3ebcdbd54ad88b (diff) | |
| download | bcm5719-llvm-9d73cabf22b970ec47eaae9b01ca55430f426618.tar.gz bcm5719-llvm-9d73cabf22b970ec47eaae9b01ca55430f426618.zip | |
Template instantiation for "if" statements. Also:
- Skip semantic analysis of the "if" condition if it is type-dependent.
- Added the location of the "else" keyword into IfStmt, so that we can
provide it for type-checking after template instantiation.
llvm-svn: 71875
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/PCHReaderStmt.cpp | 1 | ||||
| -rw-r--r-- | clang/lib/Frontend/PCHWriterStmt.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReaderStmt.cpp b/clang/lib/Frontend/PCHReaderStmt.cpp index 1c6f3f1da7b..eb8dab968b7 100644 --- a/clang/lib/Frontend/PCHReaderStmt.cpp +++ b/clang/lib/Frontend/PCHReaderStmt.cpp @@ -172,6 +172,7 @@ unsigned PCHStmtReader::VisitIfStmt(IfStmt *S) { S->setThen(StmtStack[StmtStack.size() - 2]); S->setElse(StmtStack[StmtStack.size() - 1]); S->setIfLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + S->setElseLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); return 3; } diff --git a/clang/lib/Frontend/PCHWriterStmt.cpp b/clang/lib/Frontend/PCHWriterStmt.cpp index d37df07d077..af5d5635877 100644 --- a/clang/lib/Frontend/PCHWriterStmt.cpp +++ b/clang/lib/Frontend/PCHWriterStmt.cpp @@ -165,6 +165,7 @@ void PCHStmtWriter::VisitIfStmt(IfStmt *S) { Writer.WriteSubStmt(S->getThen()); Writer.WriteSubStmt(S->getElse()); Writer.AddSourceLocation(S->getIfLoc(), Record); + Writer.AddSourceLocation(S->getElseLoc(), Record); Code = pch::STMT_IF; } |

