aboutsummaryrefslogtreecommitdiff
path: root/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-08-14[Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere1-1/+1
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2016-10-10[Examples] Fix use of sema.LateParsedTemplateMap in clang/examples.Justin Lebar1-2/+3
llvm-svn: 283778
2016-02-11Revert r260265, "clang-cl: Support loading plugins on Windows"NAKAMURA Takumi1-1/+0
It causes memory exhaust on mingw-w64(x64). Investigating. llvm-svn: 260536
2016-02-09clang-cl: Support loading plugins on WindowsEhsan Akhgari1-0/+1
This builds on the support being added to LLVM to import and export registries from DLLs. This will allow us to pick up the registry entries added in the DLL's copy of FrontendPluginRegistry. This will allow us to use plugins on Windows using: $ clang-cl -Xclang -load -Xclang plugin.dll \ -Xclang -add-plugin -Xclang foo llvm-svn: 260265
2015-06-22Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko1-1/+1
llvm-svn: 240353
2015-06-22Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko1-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
2015-05-17Don't leak TemplateIds when a plugin parses late-parsed templates at TU end.Nico Weber1-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
2015-04-11Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko1-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
2015-01-23Replace size() calls on containers with empty() calls where appropriate. NFCAlexander Kornienko1-1/+1
http://reviews.llvm.org/D7090 Patch by Gábor Horváth! llvm-svn: 226914
2014-08-10Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie1-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
2014-07-17Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie1-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
2014-07-17unique_ptr-ify ownership of ASTConsumersDavid Blaikie1-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
2013-12-21Fix getCustomDiagID() usage in example codeAlp Toker1-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
2012-12-04Sort the #include lines for examples/...Chandler Carruth1-1/+1
llvm-svn: 169241
2012-04-26Reverted unintentional commit.Manuel Klimek1-2/+1
llvm-svn: 155629
2012-04-26Adds a small tutorial on how to write RAV based ASTFrontendActions.Manuel Klimek1-1/+2
llvm-svn: 155627
2011-11-19Update signature of HandleTopLevelDecl.Douglas Gregor1-1/+3
llvm-svn: 145001
2011-09-27Fix examples for r140478. PR11021.Eli Friedman1-2/+2
llvm-svn: 140618
2010-08-02Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance objectDaniel Dunbar1-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
2010-07-26Make a variable static.Dan Gohman1-1/+1
llvm-svn: 109438
2010-06-16Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy ↵Daniel Dunbar1-1/+14
Straszheim! llvm-svn: 106113
2009-12-11Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.Daniel Dunbar1-2/+2
llvm-svn: 91176
2009-11-15Add a trivial example plugin, which prints the names of the top-level decls.Daniel Dunbar1-0/+44
- The build scriptage is about twice as long as the code, which is nice. :) llvm-svn: 88826