]> granicus.if.org Git - clang/commit
[AST] Refactor PredefinedExpr
authorBruno Ricci <riccibrun@gmail.com>
Sat, 27 Oct 2018 19:21:19 +0000 (19:21 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Sat, 27 Oct 2018 19:21:19 +0000 (19:21 +0000)
commita0460af1b7e180482abd90d5b9933257da3d8d8a
treeca2d39ee1e7f62abf1b527724b5d94267766c3c1
parent8283bbb9428739d4caef93a18f1c05a6d959920e
[AST] Refactor PredefinedExpr

Make the following changes to PredefinedExpr:

1. Move PredefinedExpr below StringLiteral so that it can use its definition.
2. Rename IdentType to IdentKind to be more in line with clang's conventions,
   and propagate the change to its users.
3. Move the location and the IdentKind into the newly available space of
   the bit-fields of Stmt.
4. Only store the function name when needed. When parsing all of Boost,
   of the 1357 PredefinedExpr 919 have no function name.

Differential Revision: https://reviews.llvm.org/D53605

Reviewed By: rjmccall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345460 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/clang/AST/Expr.h
include/clang/AST/Stmt.h
include/clang/AST/StmtDataCollectors.td
include/clang/Sema/Sema.h
lib/AST/ASTDumper.cpp
lib/AST/ASTImporter.cpp
lib/AST/Expr.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprConstant.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp