summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Frontend/FrontendActionTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-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
* Move LangStandard*, InputKind::Language to BasicRainer Orth2019-08-051-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a prerequisite for using LangStandard from Driver in https://reviews.llvm.org/D64793. It moves LangStandard* and InputKind::Language to Basic. It is mostly mechanical, with only a few changes of note: - enum Language has been changed into enum class Language : uint8_t to avoid a clash between OpenCL in enum Language and OpenCL in enum LangFeatures and not to increase the size of class InputKind. - Now that getLangStandardForName, which is currently unused, also checks both canonical and alias names, I've introduced a helper getLangKind which factors out a code pattern already used 3 times. The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. There's a companion patch for lldb which uses LangStandard.h (https://reviews.llvm.org/D65717). While polly includes isl which in turn uses InputKind::C, that part of the code isn't even built inside the llvm tree. I've posted a patch to allow for both InputKind::C and Language::C upstream (https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE). Differential Revision: https://reviews.llvm.org/D65562 llvm-svn: 367864
* Modules: Add LangOptions::CacheGeneratedPCHDuncan P. N. Exon Smith2019-03-121-1/+39
| | | | | | | | | | | Add an option to cache the generated PCH in the ModuleCache when emitting it. This protects clients that build PCHs and read them in the same process, allowing them to avoid race conditions between parallel jobs the same way that Clang's implicit module build system does. rdar://problem/48740787 llvm-svn: 355950
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-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
* Remove 'Filename' parameter from BeginSourceFileAction.Richard Smith2017-06-091-3/+2
| | | | | | | | | No-one was using this, and it's not meaningful in general -- FrontendActions can be run on inputs that don't have a corresponding source file. The current frontend input can be obtained by asking the FrontendAction if any future action actually needs it. llvm-svn: 305045
* Refactor frontend InputKind to prepare for treating module maps as a ↵Richard Smith2017-04-261-8/+8
| | | | | | | | distinct kind of input. No functionality change intended. llvm-svn: 301442
* Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase ↵David Blaikie2017-01-061-10/+10
| | | | | | | | | | | | | | and CodeCompleteConsumer" Aleksey Shlypanikov pointed out my mistake in migrating an explicit unique_ptr to auto - I was expecting the function returned a unique_ptr, but instead it returned a raw pointer - introducing a leak. Thanks Aleksey! This reapplies r291184, reverted in r291249. llvm-svn: 291270
* Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and ↵David Blaikie2017-01-061-10/+10
| | | | | | | | | | CodeCompleteConsumer" Caused a memory leak reported by asan. Reverting while I investigate. This reverts commit r291184. llvm-svn: 291249
* IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and ↵David Blaikie2017-01-051-10/+10
| | | | | | CodeCompleteConsumer llvm-svn: 291184
* [Frontend] Allow attaching an external sema source to compiler instance and ↵Benjamin Kramer2016-11-161-0/+63
| | | | | | | | | | | extra diags to TypoCorrections This can be used to append alternative typo corrections to an existing diag. include-fixer can use it to suggest includes to be added. Differential Revision: https://reviews.llvm.org/D26745 llvm-svn: 287128
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+2
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-4/+5
| | | | | | | | | | | | | | | | | | | | 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
* Reland r219810 "Fix late template parsing leak with incremental processing"Reid Kleckner2014-10-221-4/+45
| | | | | | | | | | | | | | Original message: Add a second late template parser callback meant to cleanup any resources allocated by late template parsing. Call it from the Sema::ActOnEndOfTranslationUnit method after all pending template instantiations have been completed. Teach Parser::ParseTopLevelDecl to install the cleanup callback when incremental processing is enabled so that Parser::TemplateIds can be freed. Patch by Brad King! llvm-svn: 220400
* Revert "Fix late template parsing leak with incremental processing"Reid Kleckner2014-10-151-45/+4
| | | | | | | | This reverts commit r219810. The test suite appears broken. llvm-svn: 219813
* Fix late template parsing leak with incremental processingReid Kleckner2014-10-151-4/+45
| | | | | | | | | | | | | Add a second late template parser callback meant to cleanup any resources allocated by late template parsing. Call it from the Sema::ActOnEndOfTranslationUnit method after all pending template instantiations have been completed. Teach Parser::ParseTopLevelDecl to install the cleanup callback when incremental processing is enabled so that Parser::TemplateIds can be freed. Patch by Brad King! llvm-svn: 219810
* Revert over-eager unique_ptr conversion.Benjamin Kramer2014-09-101-6/+6
| | | | | | | This test wants to observe PPCallbacks after they have been moved into the preprocessor. That doesn't work if the pointer has been moved away. llvm-svn: 217481
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-101-6/+6
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* Update for LLVM api change.Rafael Espindola2014-08-271-3/+6
| | | | llvm-svn: 216585
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-3/+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
* Flip the order the preprocessor and frontendaction are informed of the end ↵Benjamin Kramer2014-08-071-0/+46
| | | | | | | | | | | of a file. This allows using EndOfMainFile from a PPCallback to access data from the action. The pattern of PPCallback referencing an action is common in clang-tidy. Differential Revision: http://reviews.llvm.org/D4773 llvm-svn: 215145
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-3/+3
| | | | | | | | | 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-3/+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
* ASTContext: Declare builtin types implicitlyAlp Toker2013-12-151-8/+6
| | | | | | | | | | | | | | __builtin_va_list and friends have been showing up where they shouldn't for way to long, making unwanted appearences in -ast-print, tooling and source level visitors and even the hello world tutorial on the clang website. This commit factors down the implicit typedef and record creation facilities to ensure they're marked implicit. Also fixes a unit test that was testing incorrect behaviour, and removes old hacks in the DeclPrinter that tried to skip implicit declarations manually. llvm-svn: 197336
* [Parser] Unbreak parsing with incremental parsing enabled and add a ↵Argyrios Kyrtzidis2013-11-241-0/+32
| | | | | | unit-test for it. llvm-svn: 195564
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-1/+1
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* Really sort the #include lines in unittests/...Chandler Carruth2012-12-041-1/+1
| | | | | | I forgot to re-sort after fixing main module headers. llvm-svn: 169244
* Sort the #include lines for unittests/...Chandler Carruth2012-12-041-4/+2
| | | | | | I've tried to place sensible headers at the top as main-module headers. llvm-svn: 169243
* Update unittests for include change.Benjamin Kramer2012-07-041-0/+1
| | | | llvm-svn: 159724
* Fix broken unit testDouglas Gregor2012-01-201-2/+2
| | | | llvm-svn: 148547
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-2/+0
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-0/+2
| | | | llvm-svn: 126050
* Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne2011-02-181-2/+0
| | | | | | | | | This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies. llvm-svn: 125820
* Add gTest unittests to clang, and write the first one.Jeffrey Yasskin2011-02-031-0/+76
This is the Makefile version only; the cmake implementation is coming soon. llvm-svn: 124777
OpenPOWER on IntegriCloud