diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2019-01-26 13:58:15 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2019-01-26 13:58:15 +0000 |
commit | 94498c70ae44d51835f4a7110877ed77c48251b2 (patch) | |
tree | 08d6bcfd5620241f9d0ca00bfb776a214e9862ca /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 01998388838d6c8a784e4b453a68daa46fea172d (diff) | |
download | bcm5719-llvm-94498c70ae44d51835f4a7110877ed77c48251b2.tar.gz bcm5719-llvm-94498c70ae44d51835f4a7110877ed77c48251b2.zip |
[AST][NFC] Various cleanups to GenericSelectionExpr
Various cleanups to GenericSelectionExpr factored out of D57104. In particular:
1. Move the friend declaration to the top.
2. Introduce a constant ResultDependentIndex instead of the magic "-1".
3. clang-format
4. Group the member function together so that they can be removed as one block
by D57106.
NFC.
Differential Revision: https://reviews.llvm.org/D57238
Reviewed By: aaron.ballman
llvm-svn: 352275
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index cd1aae4cebb..582d9933a0c 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -969,13 +969,13 @@ void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) { void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) { VisitExpr(E); Record.push_back(E->getNumAssocs()); + Record.push_back(E->ResultIndex); Record.AddStmt(E->getControllingExpr()); for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) { Record.AddTypeSourceInfo(E->getAssocTypeSourceInfo(I)); Record.AddStmt(E->getAssocExpr(I)); } - Record.push_back(E->isResultDependent() ? -1U : E->getResultIndex()); Record.AddSourceLocation(E->getGenericLoc()); Record.AddSourceLocation(E->getDefaultLoc()); |