summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* PR15067 (again): Don't warn about UCNs in C90 if we're raw-lexing.Jordan Rose2013-01-281-0/+3
| | | | | | Fixes a crash. Thanks, Richard. llvm-svn: 173701
* FileCheck'ize and merge testsDmitri Gribenko2013-01-282-7/+11
| | | | llvm-svn: 173697
* FileCheck'ize testDmitri Gribenko2013-01-281-5/+9
| | | | llvm-svn: 173696
* Several small changes in formatting decisions.Daniel Jasper2013-01-281-1/+1
| | | | | | | | | | | | | | | | | 1. Use a hanging ident for function calls nested in binary expressions. E.g.: int aaaaa = aaaaaaaaa && aaaaaaaaaa( aaaaaaaaaa); 2. Slightly improve heuristic for builder type expressions and reduce penalty for breaking before "." and "->" in those. 3. Remove mostly obsolete metric of decreasing indent level. This fixes: llvm.org/PR14931. Changes #1 and #2 were necessary to keep tests passing after #3. llvm-svn: 173680
* Print warning instead of error if optional ASan features are enabled w/o ↵Alexey Samsonov2013-01-281-1/+7
| | | | | | specifying -fsanitize=address llvm-svn: 173670
* Fix the indentation of the first line of preprocessor outputHal Finkel2013-01-281-0/+7
| | | | | | | | | | The -E output from clang did not produce the correct indentation on the first line. This is because MoveToLine returned false, and when this happens, the regular process for producing initial indentation is skipped. Thanks to Eli for suggesting a way to simplify this to a one-line change. llvm-svn: 173657
* Tests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]]Richard Smith2013-01-281-0/+18
| | | | | | attribute). llvm-svn: 173645
* Add a -pedantic warning: an anonymous union within an anonymous union is notRichard Smith2013-01-282-7/+7
| | | | | | | permitted in standard C++, despite being silently accepted by many (all?) major C++ implementations. llvm-svn: 173643
* Comment parsing: fix test in r173626 for -fms-extensions -fms-compatibilityDmitri Gribenko2013-01-271-1/+1
| | | | llvm-svn: 173633
* Decl printer: fix CXXConstructExpr with implicit default argumentDmitri Gribenko2013-01-271-0/+21
| | | | | | Patch by Will Wilson. llvm-svn: 173630
* Comment parsing: attach any tag type's documentation to its typedef if latterDmitri Gribenko2013-01-272-1/+43
| | | | | | | | does not have one of its own. // rdar://13067629 Original patch (r173586 and r173587) by Fariborz Jahanian, modified by me. llvm-svn: 173626
* PR15067: Don't assert when a UCN appears in a C90 file.Jordan Rose2013-01-271-2/+4
| | | | | | | Unfortunately, we can't accept the UCN as an extension because we're required to treat it as two tokens for preprocessing purposes. llvm-svn: 173622
* [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory ↵NAKAMURA Takumi2013-01-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | for unittests. For example, cur) unittests/ADT/Release/ADTTests new) unittests/ADT/ADTTests RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR. With Make and Ninja, the tree is not built with multiple configurations. Then, including the build type in target directory doesn't make sense. See also "How can I build multiple modes without switching?" http://www.cmake.org/Wiki/CMake_FAQ CMAKE_CFG_INTDIR is set to "." With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example, unittests/ADT/Release/ADTTests.exe CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)". Thus, "--param build_config" is also deprecated. llvm-svn: 173616
* Revert r173586 (and r173587) , "Attach any tag type's documentation to its ↵NAKAMURA Takumi2013-01-271-6/+0
| | | | | | | | typedef if" It caused unexpected warnings with @tparam. llvm-svn: 173614
* PR14566: Debug Info: avoid top level lexical blocks in functionsDavid Blaikie2013-01-265-9/+6
| | | | | | | | | | | | | | | One of the gotchas (see changes to CodeGenFunction) was due to the fix in r139416 (for PR10829). This only worked previously because the top level lexical block would set the location to the end of the function, the debug location would be updated (as per r139416), the location would be set to the end of the function again (but that would no-op, since it was the same as the previous location), then the return instruction would be emitted using the debug location. Once the top level lexical block was no longer emitted, the end-of-function location change was causing the debug loc to be updated, regressing that bug. llvm-svn: 173593
* Attach any tag type's documentation to its typedef ifFariborz Jahanian2013-01-261-0/+6
| | | | | | latter does not have one of its own. // rdar://13067629 llvm-svn: 173586
* Migrate tests to -verifyDmitri Gribenko2013-01-263-3/+7
| | | | llvm-svn: 173582
* Specify non-GNU-ARM triples for key-function test.Tim Northover2013-01-261-1/+2
| | | | | | | Since ARM has diverging ABIs on this detail, it's probably worth testing both it and a "normal" Itanium system. llvm-svn: 173576
* clang/test/Misc/diag-template-diffing-color.cpp: Symbolize color sequences ↵NAKAMURA Takumi2013-01-261-14/+14
| | | | | | in FileCheck. llvm-svn: 173561
* clang/test/Misc/ast-dump-color.cpp: Symbolize color sequences in FileCheck.NAKAMURA Takumi2013-01-261-59/+59
| | | | | FIXME: If FileCheck had expressions something predefined well-known... llvm-svn: 173558
* [analyzer] C++ initializers may require cleanups; look through these.Jordan Rose2013-01-261-0/+30
| | | | | | | | | | | | | | When the analyzer sees an initializer, it checks if the initializer contains a CXXConstructExpr. If so, it trusts that the CXXConstructExpr does the necessary work to initialize the object, and performs no further initialization. This patch looks through any implicit wrapping expressions like ExprWithCleanups to find the CXXConstructExpr inside. Fixes PR15070. llvm-svn: 173557
* Give a more informative error message when the dot or arrow operator is usedRichard Trieu2013-01-261-0/+18
| | | | | | | on a type. Currently, it gives a generic "expected unqualified-id" error. The new error message is "cannot use (dot|arrow) operator on a type". llvm-svn: 173556
* Fix mismatch between pointer and pointee type when diagnosing an incorrectRichard Smith2013-01-261-0/+8
| | | | | | object argument type for a member call. llvm-svn: 173554
* Fix test case by being more lenient on what to accept as a path name.Richard Trieu2013-01-261-1/+1
| | | | llvm-svn: 173553
* Hopefuly unbreak buldbot.Fariborz Jahanian2013-01-261-3/+3
| | | | llvm-svn: 173549
* Highlight various parts of the AST dump with color. Colors are controlled byRichard Trieu2013-01-261-0/+87
| | | | | | | -f(no-)color-diagnostics. In addition, dumpColor() function calls are added to force color printing. No structural changes to -ast-dump. llvm-svn: 173548
* [analyzer] Track null object lvalues back through C++ method calls.Jordan Rose2013-01-261-0/+36
| | | | | | | | | | The expression 'a->b.c()' contains a call to the 'c' method of 'a->b'. We emit an error if 'a' is NULL, but previously didn't actually track the null value back through the 'a->b' expression, which caused us to miss important false-positive-suppression cases, including <rdar://problem/12676053>. llvm-svn: 173547
* [analyzer] Add 'prune-paths' config option to disable path pruning.Jordan Rose2013-01-261-0/+21
| | | | | | This should be used for testing only. Path pruning is still on by default. llvm-svn: 173545
* Fix up the test.Fariborz Jahanian2013-01-261-9/+15
| | | | | | for // rdar://11861085 llvm-svn: 173543
* Revert r172285 (suppressing a 'redundant' -Wc++98-compat warning) and add aRichard Smith2013-01-261-0/+2
| | | | | | testcase for a situation it caused us to miss. llvm-svn: 173540
* Comment parsing: actually check for a block command after "\param x"Dmitri Gribenko2013-01-262-0/+29
| | | | | | This fixes PR15068. llvm-svn: 173539
* Preserve Sema::UndefinedInternals across PCH boundaries. FixesNick Lewycky2013-01-261-0/+15
| | | | | | -Wundefined-internal warnings with PCH. llvm-svn: 173538
* patch for PR9027 and // rdar://11861085Fariborz Jahanian2013-01-252-0/+84
| | | | | | | | | | | Title: [PR9027] volatile struct bug: member is not loaded at -O; This is caused by last flag passed to @llvm.memcpy being false, not honoring that aggregate has at least one 'volatile' data member (even though aggregate itself has not been qualified as 'volatile'. As a result, optimization optimizes away the memcpy altogether. Patch review by John MaCall (I still need to fix up a test though). llvm-svn: 173535
* clang/test/Index/annotate-comments-typedef.m: Remove CommentXMLValid in ↵NAKAMURA Takumi2013-01-251-2/+2
| | | | | | CHECKs. Don't assume libxml2 here. llvm-svn: 173534
* ARM says that the array cookie should always be eight bytes.John McCall2013-01-251-0/+52
| | | | | | | ARM is not thinking about over-aligned structures. Overrule ARM in both our generic-ARM and iOS ABI implementations. llvm-svn: 173531
* clang/test/Preprocessor/iwithprefix.c: Tweak default includes not to use ↵NAKAMURA Takumi2013-01-251-1/+1
| | | | | | | | | | /usr/include. You may see such a message on non-posix system; ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/include" llvm-svn: 173525
* Attach enum's documentation to its typedef ifFariborz Jahanian2013-01-251-0/+30
| | | | | | latter does not have one of its own. // rdar://13067629 llvm-svn: 173516
* The standard ARM C++ ABI dictates that inline functions areJohn McCall2013-01-253-4/+501
| | | | | | | | never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. llvm-svn: 173515
* Remove useless 'XPASS: *' from testsDmitri Gribenko2013-01-256-6/+1
| | | | llvm-svn: 173511
* Temporarily disabling ms-asm testRenato Golin2013-01-251-0/+1
| | | | llvm-svn: 173510
* This test actually passes, just add the missing expected-errorDmitri Gribenko2013-01-251-3/+3
| | | | llvm-svn: 173504
* Migrate test from grep to -fdiagnostics-parseable-fixitsDmitri Gribenko2013-01-251-1/+9
| | | | llvm-svn: 173496
* Silence unintended fallthrough diagnostic on a case label preceded with a ↵Alexander Kornienko2013-01-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | normal label. Summary: It's unlikely that a fallthrough is unintended in the following code: switch (n) { ... label: case 1: ... goto label; ... } Reviewers: rsmith, doug.gregor Reviewed By: doug.gregor CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D329 llvm-svn: 173486
* FileCheck'ize testsDmitri Gribenko2013-01-252-6/+11
| | | | llvm-svn: 173484
* Migrate tests to -verify and merge themDmitri Gribenko2013-01-252-7/+8
| | | | llvm-svn: 173482
* [tests] Force a triple to ensure /usr/include is one of the entries.Daniel Dunbar2013-01-251-1/+2
| | | | llvm-svn: 173469
* [tests] Add a test for -iwithprefix.Daniel Dunbar2013-01-251-0/+16
| | | | | | | - This just scratches the surface, We have pretty horrible test coverage in this area it seems like, but this at least covers the change in r173410. llvm-svn: 173464
* Add space after ';'.Fariborz Jahanian2013-01-251-4/+4
| | | | llvm-svn: 173462
* Improve diagnsotic further on integer overflow.Fariborz Jahanian2013-01-251-4/+5
| | | | llvm-svn: 173461
* Don't suggest to insert [[clang::fallthrough]] before empty cases. Fix for ↵Alexander Kornienko2013-01-251-0/+2
| | | | | | multiple case labels. llvm-svn: 173458
OpenPOWER on IntegriCloud