summaryrefslogtreecommitdiffstats
path: root/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Don't leak TemplateIds when a plugin parses late-parsed templates at TU end.Nico Weber2015-05-171-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | In -fdelayed-template-parsing mode, templates that aren't used are not parsed at all. For some diagnostic plugins, this is a problem since they want to analyse the contents of the template function body. What has been suggested on cfe-dev [1] is to explicitly parse interesting templates in HandleTranslationUnit(); IWYU does this for example [2]. This is workable, but since the delayed parsing doesn't run below a call to ParseTopLevelDecl(), no DestroyTemplateIdAnnotationsRAIIObj object is on the stack to clean up TemplateIds that are created during parsing. To fix this, let ~Parser() clean them up in delayed template parsing mode instead of leaking (or asserting in +Assert builds). (r219810, relanded in r220400, fixed the same problem in incremental processing mode; the review thread of r219810 has a good discussion of the problem.) To test this, give the PrintFunctionNames plugin a flag to force parsing of a template and add a test that uses it in -fdelayed-template-parsing mode. Without the Parser.cpp change, that test asserts. 1: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-August/038415.html 2: https://code.google.com/p/include-what-you-use/source/detail?r=566 llvm-svn: 237531
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Replace size() calls on containers with empty() calls where appropriate. NFCAlexander Kornienko2015-01-231-1/+1
| | | | | | | | http://reviews.llvm.org/D7090 Patch by Gábor Horváth! llvm-svn: 226914
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-2/+3
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-3/+2
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-171-2/+3
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* Fix getCustomDiagID() usage in example codeAlp Toker2013-12-211-3/+3
| | | | | | | This was setting a bad example. DiagIDs are a limited resource and the message argument is evaluated as a format string. llvm-svn: 197855
* Sort the #include lines for examples/...Chandler Carruth2012-12-041-1/+1
| | | | llvm-svn: 169241
* Reverted unintentional commit.Manuel Klimek2012-04-261-2/+1
| | | | llvm-svn: 155629
* Adds a small tutorial on how to write RAV based ASTFrontendActions.Manuel Klimek2012-04-261-1/+2
| | | | llvm-svn: 155627
* Update signature of HandleTopLevelDecl.Douglas Gregor2011-11-191-1/+3
| | | | llvm-svn: 145001
* Fix examples for r140478. PR11021.Eli Friedman2011-09-271-2/+2
| | | | llvm-svn: 140618
* Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance objectDaniel Dunbar2010-08-021-4/+16
| | | | | | | | | | | | for use in reporting diagnostics. - We don't want to use the Action's own CompilerInstance, because that is only initialized during file processing and I like that invariant. Also, if ParseArgs returns false then abandon execution. Also, remove unused PluginASTAction::PrintHelp virtual method. llvm-svn: 110039
* Make a variable static.Dan Gohman2010-07-261-1/+1
| | | | llvm-svn: 109438
* Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy ↵Daniel Dunbar2010-06-161-1/+14
| | | | | | Straszheim! llvm-svn: 106113
* Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.Daniel Dunbar2009-12-111-2/+2
| | | | llvm-svn: 91176
* Add a trivial example plugin, which prints the names of the top-level decls.Daniel Dunbar2009-11-151-0/+44
- The build scriptage is about twice as long as the code, which is nice. :) llvm-svn: 88826
OpenPOWER on IntegriCloud