[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)
commit17ff026b730dd4c31dd72a3f7c4f971295b4cfa5
tree5ee154b6224677d3068571be8b59b8c535ba6b68
parent41d11c0e01566241ea9a238a3a8e3e47da20fcf0
[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

llvm-svn: 345460
17 files changed:
clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
clang/include/clang/AST/Expr.h
clang/include/clang/AST/Stmt.h
clang/include/clang/AST/StmtDataCollectors.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTDumper.cpp
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/Expr.cpp
clang/lib/AST/StmtPrinter.cpp
clang/lib/AST/StmtProfile.cpp
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGExprConstant.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp