llvm-project/clang/docs
Stephen Kelly 246b428fb3 [AST] Ignore implicit nodes in IgnoreUnlessSpelledInSource mode
Update the ASTNodeTraverser to dump only nodes spelled in source.  There
are only a few which need to be handled, but Decl nodes for which
isImplicit() is true are handled together.

Update the RAV instances used in ASTMatchFinder to ignore the nodes too.
As with handling of template instantiations, it is necessary to allow
the RAV to process the implicit nodes because they need to be visitable
before the first traverse() matcher is encountered.  An exception to
this is in the MatchChildASTVisitor, because we sometimes wish to make a
node matchable but make its children not-matchable.  This is the case
for defaulted CXXMethodDecls for example.

Extend TransformerTests to illustrate the kinds of problems that can
arise when performing source code rewriting due to matching implicit
nodes.

This change accounts for handling nodes not spelled in source when using
direct matching of nodes, and when using the has() and hasDescendant()
matchers.  Other matchers such as
cxxRecordDecl(hasMethod(cxxMethodDecl())) still succeed for
compiler-generated methods for example after this change.  Updating the
implementations of hasMethod() and other matchers is for a follow-up
patch.

Differential Revision: https://reviews.llvm.org/D90982
2020-11-17 16:30:07 +00:00
..
CommandGuide [clang][docs] Fix documentation of -O 2020-09-17 13:44:01 +01:00
analyzer [NFC][Docs] fix clang-docs compilation 2020-09-24 13:13:38 +02:00
tools [ASTMatchers] Enhanced support for matchers taking Regex arguments 2020-07-02 14:52:25 +01:00
APINotes.rst docs: add documentation describing API Notes 2020-10-05 18:29:13 +00:00
AddressSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
AutomaticReferenceCounting.rst Rewrite the non-trivial structs section of the ARC spec. 2020-03-06 02:51:45 -05:00
Block-ABI-Apple.rst Fix the type of the invoke function in the block ABI documentation 2020-09-04 10:29:09 -07:00
Block-ABI-Apple.txt Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
BlockLanguageSpec.rst
CMakeLists.txt fix comment typo to cycle bots 2020-04-06 18:58:27 -04:00
ClangCheck.rst
ClangCommandLineReference.rst [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
ClangFormat.rst Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
ClangFormatStyleOptions.rst [clang-format] Add a SpaceAroundPointerQualifiers style option 2020-10-18 18:17:50 +01:00
ClangFormattedStatus.rst [clang-format] NFC 1% improvement in the overall clang-formatted status 2020-06-27 12:18:23 +01:00
ClangPlugins.rst Add an attribute plugin example 2020-03-25 14:33:44 +00:00
ClangStaticAnalyzer.rst [analyzer]Add user docs rst 2019-07-10 14:49:53 +00:00
ClangTools.rst Fix some sphinx doc errors. 2019-02-01 17:06:41 +00:00
ConstantInterpreter.rst [docs] Fix warnings in ConstantInterpreter 2020-05-23 19:36:05 +00:00
ControlFlowIntegrity.rst [docs] Update ControlFlowIntegrity.rst. 2020-10-02 12:01:05 -07:00
ControlFlowIntegrityDesign.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
CrossCompilation.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
DataFlowSanitizer.rst [docs] Add missing semicolon to example. 2020-08-14 13:46:05 -07:00
DataFlowSanitizerDesign.rst
DiagnosticsReference.rst Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2020-11-14 13:12:38 +03:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks. 2020-10-30 12:53:15 -07:00
HowToSetupToolingForLLVM.rst Don't call anyone lazy in the documentation. 2020-03-17 16:33:28 -04:00
InternalsManual.rst Add ParsedAttrInfo::handleDeclAttribute 2020-03-23 13:23:11 +00:00
IntroductionToTheClangAST.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
LTOVisibility.rst [Docs] Document --lto-whole-program-visibility 2020-08-25 19:44:54 -07:00
LanguageExtensions.rst Add option 'exceptions' to pragma clang fp 2020-10-31 17:36:12 +07:00
LeakSanitizer.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
LibASTImporter.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
LibASTMatchers.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
LibASTMatchersReference.html Add new matchers for dependent names in templates 2020-11-06 21:03:20 +00:00
LibASTMatchersTutorial.rst fix a doc typo to cycle bots 2019-12-20 21:39:01 -05:00
LibFormat.rst [clang-format][docfix] Update predefined styles in docs 2020-05-20 20:03:53 -04:00
LibTooling.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
MSVCCompatibility.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
Makefile.sphinx
MatrixTypes.rst typo fixes to cycle bots 2020-07-01 19:20:05 -04:00
MemorySanitizer.rst [ReleaseNotes] MemorySanitizer support of ASLR on FreeBSD 2019-08-27 10:04:03 +00:00
Modules.rst Allow searching for prebuilt implicit modules. 2020-11-10 10:14:13 -08:00
ObjectiveCLiterals.rst
OpenCLSupport.rst [OpenCL] Add doc to describe OpenCL support 2019-10-17 12:56:02 +00:00
OpenMPSupport.rst [OpenMP][Docs] Mark `present` map type modifier as done 2020-08-05 10:03:31 -04:00
PCHInternals.rst [Documentation] Use HTTPS whenever possible 2019-01-23 20:39:07 +00:00
PCHLayout.graffle
PCHLayout.png
RAVFrontendAction.rst [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
README.txt
RefactoringEngine.rst
ReleaseNotes.rst [AST] Ignore implicit nodes in IgnoreUnlessSpelledInSource mode 2020-11-17 16:30:07 +00:00
SafeStack.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
SanitizerCoverage.rst [SanitizeCoverage] Rename -fsanitize-coverage-{white,black}list to -fsanitize-coverage-{allow,block}list 2020-06-19 22:22:47 -07:00
SanitizerSpecialCaseList.rst
SanitizerStats.rst
ShadowCallStack.rst Delete x86_64 ShadowCallStack support 2019-03-07 18:56:36 +00:00
SourceBasedCodeCoverage.rst [profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR 2020-09-25 09:39:40 -07:00
ThinLTO.rst [ThinLTO][Documentation] Mention possible values for concurrency flags 2020-10-13 09:57:58 -04:00
ThreadSafetyAnalysis.rst Thread safety analysis: Improve documentation for ASSERT_CAPABILITY 2020-09-26 22:16:50 +02:00
ThreadSanitizer.rst [docs] Add some architectures into the list of supported ThreadSanitizer platforms 2019-03-05 21:10:42 +00:00
Toolchain.rst Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
Tooling.rst Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
UndefinedBehaviorSanitizer.rst Add an unsigned shift base sanitizer 2020-08-27 19:50:10 -07:00
UsersManual.rst [Driver] Add option -fproc-stat-report 2020-11-13 14:15:42 +07:00
conf.py Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] Remove LLVM_ALIGNAS 2019-07-31 03:22:08 +00:00
index.rst [docs] Fix clang/docs/UsersManual.rst after D87528 & D88446 2020-11-02 21:07:15 -08:00
make.bat

README.txt

See llvm/docs/README.txt