summaryrefslogtreecommitdiff
path: root/unittests/AST/DeclPrinterTest.cpp
Commit message (Collapse)AuthorAge
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-07
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
* Decl printing: add tests for typedefsDmitri Gribenko2014-03-03
| | | | | | | Patch by Konrad Kleine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202709 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a StmtPrinter test for implicit and explicit conversion operator calls.Benjamin Kramer2014-02-26
| | | | | | Put back a comment that I removed too aggressively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202255 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty Printer: Print constexpr and ref qualifiers. Don't print return types ↵Benjamin Kramer2014-02-25
| | | | | | on destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202181 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."Benjamin Kramer2014-02-25
| | | | | | There were many additional tests that had the bad behavior baked in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202174 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/unittests/AST,ASTMatchers: Remove _MSC_VER.NAKAMURA Takumi2014-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201485 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: explicit stringify StringRefs for conversionSaleem Abdulrasool2014-01-25
| | | | | | | | | When clang is built outside of the LLVM tree (against a corresponding version), there is no definition providing for operator<<(std::ostream &, StringRef) which is required for the assertion routines in google-test tests. Avoid the compilation failure by explicitly stringifying the StringRef prior to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200096 91177308-0d34-0410-b5e6-96231b3b80d8
* When formatting a C++-only declaration name, enable C++ mode in the formatter'sRichard Smith2014-01-22
| | | | | | | | | | language options. This is not really ideal -- we should require the right language options to be passed in, or not require language options to format a name -- but it fixes a number of *obviously* wrong formattings. Patch by Olivier Goffart! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199778 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to ssize_t from size_t to unbreak windows builders.David Majnemer2014-01-14
| | | | | | | | Builders that have -fms-compatibility on by default define size_t implicitly. Tests that provide conflicting definitions would cause unintended failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199195 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide couple of DeclPrint tests for my last patch.Fariborz Jahanian2012-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170635 91177308-0d34-0410-b5e6-96231b3b80d8
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-19
| | | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170606 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-18
| | | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170467 91177308-0d34-0410-b5e6-96231b3b80d8
* PR14558: Compute triviality of special members (etc) at the end of the classRichard Smith2012-12-11
| | | | | | | | | | definition, rather than at the end of the definition of the set of nested classes. We still defer checking of the user-specified exception specification to the end of the nesting -- we can't check that until we've parsed the in-class initializers for non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169805 91177308-0d34-0410-b5e6-96231b3b80d8
* In DeclPrint add printing of '= default'Fariborz Jahanian2012-12-05
| | | | | | | in constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169440 91177308-0d34-0410-b5e6-96231b3b80d8
* In DeclPrint add printing of 'explicit'Fariborz Jahanian2012-12-05
| | | | | | | constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169435 91177308-0d34-0410-b5e6-96231b3b80d8
* fix comment.Fariborz Jahanian2012-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169413 91177308-0d34-0410-b5e6-96231b3b80d8
* Testing C++ declarations embedded inFariborz Jahanian2012-12-05
| | | | | | | | | | <declaration> tag of Comment XML. Added DeclPrint support for constructors and fix tests accordingly. This is wip. // rdar://12378714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169412 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch for decl printer test of objective-c methods.Fariborz Jahanian2012-10-18
| | | | | | | Patch by Dmitri Gribenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166209 91177308-0d34-0410-b5e6-96231b3b80d8
* DeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgsDmitri Gribenko2012-08-31
| | | | | | | function from Tooling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162976 91177308-0d34-0410-b5e6-96231b3b80d8
* DeclPrinter tests: since now some platforms use C++11 by default, make itDmitri Gribenko2012-08-31
| | | | | | | explicitly visible in test cases which language variant is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162974 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland r160052: Default to -std=c++11 on Windows.Nico Weber2012-08-30
| | | | | | | | Also update the tests that rely on c++98 to explicitly mention that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162890 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTTests: Suppress TestCXXConstructorDecl11 on msvc for now. It seems ↵NAKAMURA Takumi2012-08-25
| | | | | | incompatible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162631 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM's plugin registry to enable registering new compilationDaniel Jasper2012-08-24
| | | | | | | 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
* Rename the ASTMatchers to better match AST nodes. Now, allDaniel Jasper2012-08-24
| | | | | | | | | 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
* DeclPrinter tests: mark test case we get wrong currently with WRONG.Dmitri Gribenko2012-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162512 91177308-0d34-0410-b5e6-96231b3b80d8
* DeclPrinter tests: add two more tests.Dmitri Gribenko2012-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162511 91177308-0d34-0410-b5e6-96231b3b80d8
* DeclPrinter, terse mode: don't print function bodiesDmitri Gribenko2012-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162294 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutputDmitri Gribenko2012-08-21
| | | | | | | to reflect the intention, not the implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162293 91177308-0d34-0410-b5e6-96231b3b80d8
* DeclPrinter: add terse output mode and lots of testsDmitri Gribenko2012-08-20
Add a flag PrintingPolicy::DontRecurseInDeclContext to provide "terse" output from DeclPrinter. The motivation is to use DeclPrinter to print declarations in user-friendly format, without overwhelming user with inner detail of the declaration being printed. Also add many tests for DeclPrinter. There are quite a few things that we print incorrectly: search for WRONG in DeclPrinterTest.cpp -- and these tests check our output against incorrect output, so that we can fix/refactor/rewrite the DeclPrinter later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162245 91177308-0d34-0410-b5e6-96231b3b80d8