aboutsummaryrefslogtreecommitdiff
path: root/unittests/Tooling
AgeCommit message (Collapse)Author
2013-03-02CommandLineArgumentParser: handle single quotes.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D482 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Streamify getNameForDiagnostic and remove the string versions of ↵Benjamin Kramer
PrintTemplateArgumentList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28Fix a typo in the name of a tooling unit testHal Finkel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173658 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-19fix the unit tests too.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172907 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko
brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Really sort the #include lines in unittests/...Chandler Carruth
I forgot to re-sort after fixing main module headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort the #include lines for unittests/...Chandler Carruth
I've tried to place sensible headers at the top as main-module headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169243 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis
compile commands of the database and expose it via the libclang API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27Allow an ASTConsumer to selectively skip function bodies while parsing. PatchRichard Smith
by Olivier Goffart! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168726 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25unittests/ToolingTest.cpp: Suppress ↵NAKAMURA Takumi
newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166674 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25Adds the possibility to inject a callback that's called after each ↵Manuel Klimek
translation unit is processed. This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166671 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23Tweak include orderDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166521 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23Buildbot debugging is funDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08CompilationDatabaseTest: Fix another Windows path issue.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08CompilationDatabase: Use //net paths for tests, as they should beDaniel Jasper
considered absolute on all platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165422 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08FileNameMatchTrie: Use StringRef instead of Twines where possible.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165412 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08Support symlinks and relative paths in complilation databases.Daniel Jasper
Review: http://llvm-reviews.chandlerc.com/D30 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165392 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek
This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30Tooling: Add a runToolOnCodeWithArgs() function that allowsNico Weber
passing additional parameters to a tool. Use this to fix a FIXME in testing code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Allow RecursiveASTVisitor to visit CXXCtorInitializer objects for whichJames Dennett
isWritten() returns false, if shouldVisitImplicitCode() returns true. Previously those CXXCtorInitializers were always skipped. In order to make this change easier to test, this patch also extends the test class template ExpectedLocationVisitor to support arbitrary numbers of expected matches and disallowed matches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162544 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Use LLVM's plugin registry to enable registering new compilationDaniel Jasper
databases. Move JSONCompilationDatabase.h to its own files and register it as plugin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162541 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Rename the ASTMatchers to better match AST nodes. Now, allDaniel Jasper
ASTMatchers have the same name as the corresponding AST nodes but are lower case. The only exceptions are the "CXX" prefixes which are not copied over to the matcher names as the goal is to actually remove these prefixes from the AST node names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-23Fix undefined behavior: member function calls where 'this' is a null pointer.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162430 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Part of PR13618: visit the TypeLoc when RecursiveASTVisitor visits a ↵Richard Smith
CompoundLiteralExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162133 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Don't forget to apply #pragma pack to partial and explicit specializations ofRichard Smith
class templates. This fixes misalignment issues in llvm/Support/Endian.h when built by Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162074 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-09[ms-inline asm] Add various MC components to clang build to support MS-style ↵Chad Rosier
inline assembly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161594 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08Add various MC components to clang build to support MS-style inline assembly.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17Fix unit test dependency in Makefile and remove unneccessary dependencyDaniel Jasper
again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160358 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17Add missing dependency for unit test.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17Finishing the move of RefactoringCallbacks and fixing the correspondingDaniel Jasper
buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160355 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17Move RefactoringCallbacks to Tooling to avoid dependency fromDaniel Jasper
ASTMatchers (lower level abstraction) to Tooling (higher level abstraction). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160351 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13Allows retrieving all files in a CompilationDatabase.Manuel Klimek
Patch by Tobias Koenig, some test changes by myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-05Adapts the FrontendAction convenience functions so that it can beManuel Klimek
used with classes that generate ASTConsumers; this allows decoupling the ASTConsumer generation from the Frontend library (like, for example, the MatchFinder in the upcoming ASTMatcher patch). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159760 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-04Update unittests for include change.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159724 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25Appease -Wnon-virtual-dtor and fix a typo in a commentMatt Beaumont-Gay
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159151 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-24Add testing for CommentHandler, and fix a bug where trailing comments in #elseRichard Smith
and #endif in non-skipped blocks were not passed to the CommentHandler. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159119 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Clang side of a refactoring of the CMake unit test build strategy.Chandler Carruth
The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages. Among other fundamental advantages, we start to get the checking logic for when a file is missing from the CMake build, and this caught one missing file already! More fun details in the LLVM commit corresponding to this one. Note that the LLVM commit and this one most both be applied, or neither. Sorry for any skew issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Make the RecursiveASTVisitor visit the body of a range-based for loopDaniel Jasper
again. This was broken in r158395. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158907 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-20Fix a big layering violation introduced by r158771.Chandler Carruth
That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158807 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-20Structured comment parsing, first step.Dmitri Gribenko
* Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-16ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode ↵NAKAMURA Takumi
on msvc. LangOpts.MicrosoftExt still appends "class type_info;". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158595 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-16Explicitly build __builtin_va_list.Meador Inge
The target specific __builtin_va_list types are now explicitly built instead of injecting strings into the preprocessor input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-13Rename shouldVisitImplicitDeclarations to shouldVisitImplicitCode.Daniel Jasper
Fix RecursiveASTVisitor to visit CXXForRangeStmts accordingly to visit implicit or explicit code. The key bug that inspired this was the Visitor not visiting the range initializer of such a loop, which is explicit code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158395 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07Move sideeffecting call out of assert().Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158146 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06Switches the RewriterTestContext away from PathV1.Manuel Klimek
Now the ToolingTests all work on Windows, and they also clean up their temporary directory if they don't crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158112 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05Fixes the refactoring library test in VS2010.Manuel Klimek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158019 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05RecursiveASTVisitor: add ability to visit implicit declarations. Patch byRichard Smith
James Dennett! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-02Revert r157819, "#ifdef out a broken test on win32"NAKAMURA Takumi
FYI, LLVM_ON_WIN32 is useless. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01#ifdef out a broken test on win32Alexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157819 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01Added a test for ToolInvocation::mapVirtualFile method.Alexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157812 91177308-0d34-0410-b5e6-96231b3b80d8