Граф коммитов

15122 Коммитов

Автор SHA1 Сообщение Дата
Chad Rosier d256f8673b Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160590 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 23:12:26 +00:00
Tim Northover adfa45ffd6 Add "long double" to permitted list of ARM complex homogeneous aggregates.
Under AAPCS, long double is the same as double, which means it should be
allowed as part of a homogeneous aggregate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160586 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 22:29:29 +00:00
Dmitri Gribenko ae99b75fbb Add libclang APIs to walk comments ASTs and an API to convert a comment to an
HTML fragment.

For testing, c-index-test now has even more output:
* HTML rendering of a comment
* comment AST tree dump in S-expressions like Comment::dump(), but implemented
* with libclang APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160577 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 21:34:34 +00:00
Chad Rosier f925e0414d Add a new flag, -fms-inline-asm, that enables the output of MS-style inline
assembly.  

By default, we don't emit IR for MS-style inline assembly (see r158833 as to 
why).  This is strictly for testing purposes and should not be enabled with the
expectation that things will work.  This is a temporary flag and will be removed
once MS-style inline assembly is fully supported.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160573 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 21:20:33 +00:00
Aaron Ballman 4914c2897b No longer assuming the number of prototype arguments is always less than the number of formal parameters for a variadic function call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160570 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 20:40:35 +00:00
Dmitri Gribenko 9f08f49929 Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.
The assertion was wrong in case we have a verbatim block without a closing
command.

Also add tests for closing command name in a verbatim block, since now it can
be empty in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160568 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 20:18:53 +00:00
Jordan Rose bbe0175255 Re-apply r160319 "Don't crash when emitting fixits following Unicode chars"
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>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160561 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 18:50:51 +00:00
Eric Christopher b379718fea Don't need to specify the abi as it's the default.
rdar://11842763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160554 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 17:42:31 +00:00
Fariborz Jahanian 090d1bd613 Fixes an ObjC++ parse crash caused by delayed parsing
of c-functions nested in namespace in method implementations
by turning off its delayed parsing until a proper solution is 
figured out. pr13418


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160552 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 17:19:54 +00:00
Dmitri Gribenko 72021ff403 CommentBriefParser: use \returns if we can't find the \brief or just a plain
paragraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 17:01:34 +00:00
Nico Weber 4397289861 Revert r160319, it caused PR13417. Add a test for PR13417.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 06:44:52 +00:00
Nico Weber 381767fcfe Let Expr::HasSideEffects() return false for NULL, bool literals, this, and nullptr.
Fixes PR13413, -Wunused-private-field now warns on unused fields initialized to NULL.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160541 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 03:39:05 +00:00
Nico Weber 4a410dd179 Rename warn-unused-member.cpp to warn-unused-private-field.cpp to
make it match the flag it tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 01:42:44 +00:00
Chandler Carruth daa177d640 Switch to the canonical pipe-based testing of clang output using
FileCheck.

This avoids copying files around needlessly during test runs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 00:49:53 +00:00
Chandler Carruth 0ccd98dff0 Remove dos line endings. Please remember to configure your windows SVN
clients to default text files to 'eol-native'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 00:49:51 +00:00
Eric Christopher d23ec89dcc FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160528 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 22:22:58 +00:00
Eric Christopher 6dba4a1bc3 Reset the layout of an ObjC class if we see an ivar in a category
or implementation since we've now got a different layout.

Fixes rdar://11842763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160526 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 22:22:51 +00:00
Jordan Rose ddcfbc9ad1 For varargs, diagnose passing ObjC objects by value like other non-POD types.
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160517 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 18:10:23 +00:00
Jordan Rose b13291aa59 Capitalize "Objective-C" and "C++" in user-facing contexts.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 18:10:18 +00:00
Jordan Rose 48716663e4 Don't crash checking a format string if one of the arguments is invalid.
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160515 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 18:10:08 +00:00
Argyrios Kyrtzidis ee7af50cc7 Add a test case for rdar://11806334.
Makes sure we don't overflow the stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160511 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 16:08:28 +00:00
Bob Wilson 455e72e762 Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.
This macro was being unconditionally set to zero, preceded by a FIXME comment.
This fixes <rdar://problem/11845441>.  Patch by Michael Gottesman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160491 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 03:52:53 +00:00
Aaron Ballman f81678707e Relaxed enumeration constant naming rules for scoped enumerators so they no longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160490 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 03:12:23 +00:00
Bob Wilson a1ec3db3a1 Force the OS X version to 10.6 for old-style simulator builds.
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160484 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 01:35:55 +00:00
Dmitri Gribenko 858e69fe13 Fix ParagraphComment::isWhitespace(): a paragraph without a non-whitespace
TextComment node was considered whitespace even if it contained other child
nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160474 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19 00:01:56 +00:00
Aaron Ballman c0e8ad5fc3 Rolling this change back because the fix doesn't fit the symptoms (even if it solves them).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 22:38:11 +00:00
Jordan Rose 8919e688dc [analyzer] Combine all ObjC message CallEvents into ObjCMethodCall.
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160461 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 21:59:51 +00:00
Aaron Ballman 4b4327fa75 Fixing up a test case that was failing due to the lack of -std=c++11
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160455 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 21:56:43 +00:00
Ted Kremenek 21625c69e8 Fix crash in RegionStoreManager::evalDerivedToBase() due to not handling references
(in uses of dynamic_cast<>).

Fixes <rdar://problem/11817693>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160427 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 05:57:33 +00:00
Ted Kremenek 88237bf587 Teach CFG construction about destructors resulting from references to array types. Fixes crash in <rdar://problem/11671507>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 04:57:57 +00:00
Richard Smith 517bb84401 PR13381, part 2: when determining if a defaulted special member function should
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160418 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 03:51:16 +00:00
Richard Smith 6a06e5ff3b PR13381: consider cv-qualifiers on a class member's type when determining which
constructor will be used for moving that object, in the computation of its
exception specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 03:36:00 +00:00
Richard Smith 500d729e85 PR13386: When matching up parameters between a function template declaration
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160416 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 01:29:05 +00:00
Eli Friedman 5912597f3a Fix test so it works the same way on 32-bit and 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 01:03:11 +00:00
Douglas Gregor b251302dd5 When performing the deduced/actual argument type check for C++
[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>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160412 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 00:14:59 +00:00
Douglas Gregor 796158971b Remove unnecessary spacing around Objective-C object literal code
completions. Fixes <rdar://problem/11889572>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160407 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 23:24:47 +00:00
Aaron Ballman a52f5a3ee2 Adding a fixit for includes that cannot be found with angle brackets, but can be found with quoted strings instead. Implements PR13201.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160406 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 23:19:16 +00:00
Eric Christopher 75d4b1e34b Robustify test in the face of no assertions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160399 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 21:52:07 +00:00
Eli Friedman 26dc97cbeb Don't treat overflow in floating-point conversions as a hard error in constant evaluation. <rdar://problem/11874571>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160394 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 21:03:05 +00:00
Rafael Espindola 251c449b28 Handle the case where the base type is not dependent, but the derived one is.
Fixes pr13353.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 20:24:05 +00:00
Eric Christopher 74976f2311 Fix regexp for this test to properly check.
Patch by Eli Bendersky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 18:40:46 +00:00
Dmitri Gribenko 659a7124c7 CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 18:35:14 +00:00
Fariborz Jahanian 379b28183a Issue warning when assigning out-of-range integer values to enums.
Due to performance cost, this is an opt-in option placed
under -Wassign-enum. // rdar://11824807


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160382 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 18:00:08 +00:00
Jordan Rose d5209ae13a -Wobjc-literal-compare: don't warn when comparing against nil.
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 17:46:48 +00:00
Jordan Rose eec207f02a Add -Wobjc-string-compare under -Wobjc-literal-compare.
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160378 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 17:46:44 +00:00
Jordan Rose 8d872ca7f1 Now that -Wobjc-literal-compare is a warning, put the fixit on a note.
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160377 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 17:46:40 +00:00
Rafael Espindola 71adc5b587 Merge visibility from previous decls before looking at visibility pragma. This
is a bit fuzzy, but matches gcc behavior and existing code bases seem to
depend on it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 15:14:47 +00:00
NAKAMURA Takumi a555f2be4f test/Driver/crash-report.c: Remove "REQUIRES: shell". env(1) can be used also with gnuwin32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 12:00:24 +00:00
Simon Atanasyan e87f3f62bc Revert commit r160308. We decide to move builtins selection to the backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160353 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 08:15:06 +00:00
NAKAMURA Takumi df9b933aa3 [Win32] Rework crash-report since r145389.
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160343 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17 05:09:29 +00:00