summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Re-apply r160319 "Don't crash when emitting fixits following Unicode chars"Jordan Rose2012-07-201-1/+19
| | | | | | | | | This time, make sure we don't try to print fixits with newline characters, since they don't have a valid column width, and they don't look good anyway. PR13417 (and originally <rdar://problem/11877454>) llvm-svn: 160561
* Don't need to specify the abi as it's the default.Eric Christopher2012-07-201-1/+1
| | | | | | rdar://11842763 llvm-svn: 160554
* Fixes an ObjC++ parse crash caused by delayed parsingFariborz Jahanian2012-07-201-0/+4
| | | | | | | | of c-functions nested in namespace in method implementations by turning off its delayed parsing until a proper solution is figured out. pr13418 llvm-svn: 160552
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-201-0/+10
| | | | | | paragraph. llvm-svn: 160550
* Revert r160319, it caused PR13417. Add a test for PR13417.Nico Weber2012-07-202-19/+9
| | | | llvm-svn: 160542
* Let Expr::HasSideEffects() return false for NULL, bool literals, this, and ↵Nico Weber2012-07-202-1/+11
| | | | | | | | nullptr. Fixes PR13413, -Wunused-private-field now warns on unused fields initialized to NULL. llvm-svn: 160541
* Rename warn-unused-member.cpp to warn-unused-private-field.cpp toNico Weber2012-07-201-0/+0
| | | | | | make it match the flag it tests. llvm-svn: 160536
* Switch to the canonical pipe-based testing of clang output usingChandler Carruth2012-07-201-3/+1
| | | | | | | | FileCheck. This avoids copying files around needlessly during test runs. llvm-svn: 160535
* Remove dos line endings. Please remember to configure your windows SVNChandler Carruth2012-07-201-13/+13
| | | | | | clients to default text files to 'eol-native'. llvm-svn: 160534
* FileCheck-ize.Eric Christopher2012-07-191-24/+23
| | | | llvm-svn: 160528
* Reset the layout of an ObjC class if we see an ivar in a categoryEric Christopher2012-07-191-0/+35
| | | | | | | | or implementation since we've now got a different layout. Fixes rdar://11842763 llvm-svn: 160526
* For varargs, diagnose passing ObjC objects by value like other non-POD types.Jordan Rose2012-07-194-3/+11
| | | | | | | | | | | | | | While we still want to consider this a hard error (non-POD variadic args are normally a DefaultError warning), delaying the diagnostic allows us to give better error messages, which also match the usual non-POD errors more closely. In addition, this change improves the diagnostic messages for format string argument type mismatches by passing down the type of the callee, so we can say "variadic method" or "variadic function" appropriately. <rdar://problem/11825593> llvm-svn: 160517
* Capitalize "Objective-C" and "C++" in user-facing contexts.Jordan Rose2012-07-199-19/+19
| | | | | | No functionality change. llvm-svn: 160516
* Don't crash checking a format string if one of the arguments is invalid.Jordan Rose2012-07-191-0/+17
| | | | | | | | | Previously, we would ask for the SourceLocation of an argument even if it were NULL (i.e. if Sema resulted in an ExprError trying to build it). <rdar://problem/11890818> llvm-svn: 160515
* Add a test case for rdar://11806334.Argyrios Kyrtzidis2012-07-191-0/+32
| | | | | | Makes sure we don't overflow the stack. llvm-svn: 160511
* Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.Bob Wilson2012-07-191-0/+13
| | | | | | | This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
* Relaxed enumeration constant naming rules for scoped enumerators so they no ↵Aaron Ballman2012-07-191-0/+7
| | | | | | longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128. llvm-svn: 160490
* Force the OS X version to 10.6 for old-style simulator builds.Bob Wilson2012-07-191-1/+3
| | | | | | | | | | | | | The hack of recognizing a -D__IPHONE_OS_VERSION_MIN_REQUIRED option in place of -mios-simulator-version-min leaves the Darwin version unspecified. It can be set separately with -mmacosx-version-min (which makes no sense) or inferred to match the host version (which is unpredictable and usually wrong). This really needs to get cleaned up, but in the meantime, force the OS X version to 10.6 so that the behavior is sane for the iOS simulator. Thanks for Argyrios for the patch. <rdar://problem/11858187> llvm-svn: 160484
* Fix ParagraphComment::isWhitespace(): a paragraph without a non-whitespaceDmitri Gribenko2012-07-191-0/+3
| | | | | | | TextComment node was considered whitespace even if it contained other child nodes. llvm-svn: 160474
* Rolling this change back because the fix doesn't fit the symptoms (even if ↵Aaron Ballman2012-07-181-3/+3
| | | | | | it solves them). llvm-svn: 160462
* [analyzer] Combine all ObjC message CallEvents into ObjCMethodCall.Jordan Rose2012-07-182-4/+102
| | | | | | | | | | | | As pointed out by Anna, we only differentiate between explicit message sends This also adds support for ObjCSubscriptExprs, which are basically the same as properties in many ways. We were already checking these, but not emitting nice messages for them. This depends on the llvm::PointerIntPair change in r160456. llvm-svn: 160461
* Fixing up a test case that was failing due to the lack of -std=c++11Aaron Ballman2012-07-181-3/+3
| | | | llvm-svn: 160455
* Fix crash in RegionStoreManager::evalDerivedToBase() due to not handling ↵Ted Kremenek2012-07-181-0/+15
| | | | | | | | | | references (in uses of dynamic_cast<>). Fixes <rdar://problem/11817693>. llvm-svn: 160427
* Teach CFG construction about destructors resulting from references to array ↵Ted Kremenek2012-07-181-0/+16
| | | | | | types. Fixes crash in <rdar://problem/11671507>. llvm-svn: 160424
* PR13381, part 2: when determining if a defaulted special member function shouldRichard Smith2012-07-182-0/+26
| | | | | | | | be defined as deleted, take cv-qualifiers on class members into account when looking up the copy or move constructor or assignment operator which will be used for them. llvm-svn: 160418
* PR13381: consider cv-qualifiers on a class member's type when determining whichRichard Smith2012-07-181-0/+24
| | | | | | | constructor will be used for moving that object, in the computation of its exception specification. llvm-svn: 160417
* PR13386: When matching up parameters between a function template declarationRichard Smith2012-07-181-0/+43
| | | | | | | | | | | and a function template instantiation, if there's a parameter pack in the declaration and one at the same place in the instantiation, don't assume that the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead and check whether the parameter pack was expandable. We can do this as a side-effect of the work we'd need to do anyway, to find how many parameters were produced. llvm-svn: 160416
* Fix test so it works the same way on 32-bit and 64-bit.Eli Friedman2012-07-181-1/+1
| | | | llvm-svn: 160415
* When performing the deduced/actual argument type check for C++Douglas Gregor2012-07-181-0/+17
| | | | | | | | [temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the qualifiers to introduce the implicit strong lifetime when needed. Fixes <rdar://problem/11825671>. llvm-svn: 160412
* Remove unnecessary spacing around Objective-C object literal codeDouglas Gregor2012-07-172-8/+8
| | | | | | completions. Fixes <rdar://problem/11889572>. llvm-svn: 160407
* Adding a fixit for includes that cannot be found with angle brackets, but ↵Aaron Ballman2012-07-172-0/+14
| | | | | | can be found with quoted strings instead. Implements PR13201. llvm-svn: 160406
* Robustify test in the face of no assertions.Eric Christopher2012-07-171-2/+3
| | | | llvm-svn: 160399
* Don't treat overflow in floating-point conversions as a hard error in ↵Eli Friedman2012-07-173-4/+7
| | | | | | constant evaluation. <rdar://problem/11874571>. llvm-svn: 160394
* Handle the case where the base type is not dependent, but the derived one is.Rafael Espindola2012-07-171-0/+13
| | | | | | Fixes pr13353.cpp. llvm-svn: 160393
* Fix regexp for this test to properly check.Eric Christopher2012-07-171-2/+2
| | | | | | Patch by Eli Bendersky. llvm-svn: 160385
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-171-3/+14
| | | | llvm-svn: 160383
* Issue warning when assigning out-of-range integer values to enums.Fariborz Jahanian2012-07-171-0/+32
| | | | | | | Due to performance cost, this is an opt-in option placed under -Wassign-enum. // rdar://11824807 llvm-svn: 160382
* -Wobjc-literal-compare: don't warn when comparing against nil.Jordan Rose2012-07-171-2/+17
| | | | | | | | | | | | | | Checks against nil often appear as guards in macros, and comparing Objective-C literals to nil has well-defined behavior (if tautological). On OS X, 'nil' has not been typed as 'id' since 10.6 (possibly earlier), so the warning was already not firing, but other runtimes continue to use ((id)0) or some variant. This change accepts comparisons to any null pointer; to keep it simple, it looks through all casts (not just casts to 'id'). PR13276 llvm-svn: 160379
* Add -Wobjc-string-compare under -Wobjc-literal-compare.Jordan Rose2012-07-171-1/+17
| | | | | | | | | Suggested by Ted, since string literal comparison is at least slightly more sensible than comparison of runtime literals. (Ambiguous language on developer.apple.com implies that strings are guaranteed to be uniqued within a translation unit and possibly across a linked binary.) llvm-svn: 160378
* Now that -Wobjc-literal-compare is a warning, put the fixit on a note.Jordan Rose2012-07-172-43/+18
| | | | | | | | Recovering as if the user had actually called -isEqual: is a bit too far from the semantics of the program as written, /even though/ it's probably what they intended. llvm-svn: 160377
* Merge visibility from previous decls before looking at visibility pragma. ThisRafael Espindola2012-07-171-0/+20
| | | | | | | is a bit fuzzy, but matches gcc behavior and existing code bases seem to depend on it. llvm-svn: 160364
* test/Driver/crash-report.c: Remove "REQUIRES: shell". env(1) can be used ↵NAKAMURA Takumi2012-07-171-2/+1
| | | | | | also with gnuwin32. llvm-svn: 160362
* Revert commit r160308. We decide to move builtins selection to the backend.Simon Atanasyan2012-07-171-13/+0
| | | | llvm-svn: 160353
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-1/+1
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* test/Driver/crash-report.c: Small tweaks. 1) Use %t instead %T for TMP. 2) ↵NAKAMURA Takumi2012-07-171-4/+5
| | | | | | Set all of $TMPDIR, $TEMP and $TMP, or a certain host might set $TEMP. llvm-svn: 160342
* Record visibility pragmas when we see a tag declaration. We might use itRafael Espindola2012-07-171-0/+16
| | | | | | to build a type before seeing the definition. llvm-svn: 160339
* Uninitialized variables: two little changes:Richard Smith2012-07-171-8/+13
| | | | | | | * Treat compound assignment as a use, at Jordy's request. * Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;' llvm-svn: 160334
* clang/test/Tooling/clang-ast-dump.cpp: Mark it as REQUIRES: asserts, for now.NAKAMURA Takumi2012-07-171-0/+3
| | | | llvm-svn: 160332
* -Wuninitialized: Split the classification of DeclRefExprs as initialization orRichard Smith2012-07-172-2/+21
| | | | | | | | | | use out of TransferFunctions, and compute it in advance rather than on-the-fly. This allows us to handle compound assignments with DeclRefExprs on the RHS correctly, and also makes it trivial to treat const& function parameters as not initializing the argument. The patch also makes both of those changes. llvm-svn: 160330
* [analyzer] Handle new-expressions with initializers for scalars.Jordan Rose2012-07-161-8/+27
| | | | | | <rdar://problem/11818967> llvm-svn: 160328
OpenPOWER on IntegriCloud