llvm-project/clang
Stephen Kelly d627a27d26 [AST] Add generator for source location introspection
Generate a json file containing descriptions of AST classes and their
public accessors which return SourceLocation or SourceRange.

Use the JSON file to generate a C++ API and implementation for accessing
the source locations and method names for accessing them for a given AST
node.

This new API can be used to implement 'srcloc' output in clang-query:

  http://ce.steveire.com/z/m_kTIo

In this first version of this feature, only the accessors for Stmt
classes are generated, not Decls, TypeLocs etc.  Those can be added
after this change is reviewed, as this change is mostly about
infrastructure of these code generators.

Differential Revision: https://reviews.llvm.org/D93164
2021-03-10 22:38:39 +00:00
..
INPUTS
bindings [NFC] Don't run python binding tests with sanitizers 2020-10-29 23:48:08 -07:00
cmake [Fuchsia] Enable Polly for first stage as well 2021-03-05 14:35:57 -08:00
docs [analyzer][docs][NFC] Fix typo in checkers.rst 2021-03-10 12:42:23 +01:00
examples Refactoring the attribute plugin example to fit the new API 2020-12-21 08:24:09 -05:00
include [AST] Add generator for source location introspection 2021-03-10 22:38:39 +00:00
lib [AST] Add generator for source location introspection 2021-03-10 22:38:39 +00:00
runtime [compiler-rt] Fix stale incremental builds when using `LLVM_BUILD_EXTERNAL_COMPILER_RT=ON`. 2021-03-10 09:42:24 -08:00
test Replace func name with regex in update_cc_test_checks 2021-03-10 12:57:35 -08:00
tools [clang-format] Rename case sorting 2021-03-05 21:42:45 +01:00
unittests [AST] Add generator for source location introspection 2021-03-10 22:38:39 +00:00
utils [OpenCL] Use StringMap instead of std::map 2021-03-02 09:37:26 +00:00
www [www] Add cxx_status tracking for C++23. 2021-02-25 14:47:43 -08:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [clang] Don't set CLANG_DEFAULT_UNWINDLIB to none if rtlib is set to compiler-rt 2021-03-08 22:29:54 +02:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/