[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 22 16:13:52 PDT 2017
EricWF created this revision.
This patch implements the source location builtins `__builtin_LINE(), `__builtin_FUNCTION()`, `__builtin_FILE()` and `__builtin_COLUMN()`. These builtins are needed to implement [`std::experimental::source_location`](https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#reflection.src_loc.creation).
With the exception of `__builtin_COLUMN`, GCC also implements these builtins, and Clangs behavior is intended to match as closely as possible.
https://reviews.llvm.org/D37035
Files:
docs/LanguageExtensions.rst
include/clang/AST/Expr.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/AST/Stmt.h
include/clang/Basic/StmtNodes.td
include/clang/Basic/TokenKinds.def
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/Expr.cpp
lib/AST/ExprClassification.cpp
lib/AST/ExprConstant.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Parse/ParseExpr.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExceptionSpec.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/CodeGenCXX/builtin_FUNCTION.cpp
test/CodeGenCXX/builtin_LINE.cpp
test/CodeGenCXX/debug-info-line.cpp
test/Parser/builtin_source_location.c
test/Sema/source_location.c
test/SemaCXX/Inputs/source-location-file.h
test/SemaCXX/source_location.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37035.112249.patch
Type: text/x-patch
Size: 61455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170822/1000a41b/attachment-0001.bin>
More information about the cfe-commits
mailing list