Commit Graph

40293 Commits

Author SHA1 Message Date
Richard Smith da83703ed4 Fix some dead stores which the static analyzer warned about. No functionality
change (the problematic cases in ParseDecl.cpp are currently impossible).

llvm-svn: 163920
2012-09-14 18:27:01 +00:00
Richard Smith 21f06f0fcb When diagnosing multiple mem-initializers in a delegating ctor, point to the delegating initializer, not to the first initializer. For good measure, also highlight the other initializer.
llvm-svn: 163919
2012-09-14 18:21:10 +00:00
Fariborz Jahanian d7ffdecec1 Test removed.
llvm-svn: 163918
2012-09-14 17:51:34 +00:00
Fariborz Jahanian 35227ea365 objective-C arc: remove -Warc-abi in its entirety.
// rdar://10554025

llvm-svn: 163917
2012-09-14 17:48:35 +00:00
Ted Kremenek efc32c0857 Fix copy-paste error in manpage. Should be -stdlib=library.
llvm-svn: 163914
2012-09-14 17:20:56 +00:00
Douglas Gregor 8beb26e4fa Add missing test from r163874.
llvm-svn: 163910
2012-09-14 16:38:59 +00:00
Dmitri Gribenko ad45ad6fe9 Comment parsing: don't parse comment marker followed by a digit as a command
since no Doxygen command starts with a digit.

llvm-svn: 163909
2012-09-14 16:35:35 +00:00
Dmitri Gribenko 578865b73c Comment parsing: support the "\invariant" command.
llvm-svn: 163905
2012-09-14 15:37:29 +00:00
Simon Atanasyan d44138808f Do not use "lib32" directory to create a library/object files
paths when target is MIPS 32-bit.

The patch reviewed by Chandler Carruth.

llvm-svn: 163898
2012-09-14 11:27:24 +00:00
Douglas Gregor 5c65f62a1e Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam!
llvm-svn: 163874
2012-09-14 05:10:40 +00:00
Douglas Gregor 0064c5968f In debugger mode, allow comparisons between pointers and integers
without a cast. Fixes <rdar://problem/11830912>.

llvm-svn: 163873
2012-09-14 04:35:37 +00:00
Douglas Gregor 6d149412c8 As we do with base and member initializers in a dependent class, delay
type checking for non-static data member initializers in a dependent
class, because our ASTs lose too much information to when
type-checking an initializer. Fixes <rdar://problem/11974632>,
although the result is still rather unsatisfactory.

llvm-svn: 163871
2012-09-14 04:20:37 +00:00
Bob Wilson 1ec4a5e190 Improve the driver title as shown in the --help message. <rdar://12297538>
llvm-svn: 163870
2012-09-14 03:35:42 +00:00
Eli Friedman 00755e9554 Fix thunk emission for covariant virtual functions in cases which require
both a virtual and a non-virtual offset. PR13832.

llvm-svn: 163866
2012-09-14 01:45:09 +00:00
Eli Friedman 48a3291675 Fix line endings.
llvm-svn: 163865
2012-09-14 01:19:01 +00:00
Eli Friedman 21530f7c4e Fix abbreviation for CharacterLiteral in AST serialization. PR13806.
llvm-svn: 163863
2012-09-14 00:51:36 +00:00
Douglas Gregor c7203ba19c When computing the decltype of an expression, consider Objective-C
ivar and property references as member accesses and produce the actual
type of the declaration. Fixes <rdar://problem/12031582>.

llvm-svn: 163858
2012-09-13 23:40:46 +00:00
Richard Smith 31b617d7f0 Fix incorrect comment.
llvm-svn: 163850
2012-09-13 22:10:19 +00:00
Richard Smith 86a6ae8398 Fix up after r163846. Sorry!
llvm-svn: 163849
2012-09-13 22:03:58 +00:00
Douglas Gregor 1af8ad49fd Actually rebuild function types properly when adjusting the function
type of an instantiation.

llvm-svn: 163848
2012-09-13 22:01:49 +00:00
Richard Smith ca24ed473b Revert r163829. The world (or libstdc++, at least) is not ready.
llvm-svn: 163846
2012-09-13 22:00:12 +00:00
Douglas Gregor 89f593a14c When we substitute into the type of a function based on the
TypeSourceInfo, we may have lost some adjustments made to the type of
that function due to declaration merging. Adjust the resulting type
correspondingly. Fixes PR12948 / <rdar://problem/11552434>.

llvm-svn: 163845
2012-09-13 21:56:43 +00:00
Dmitri Gribenko 0b1a96a876 Comment to XML conversion: we try not to emit empty <Discussion> elements, but
it is not possible to guarantee that without duplicating logic or buffering
<Discussion> element contents.  So, allow empty <Discussion> elements in schema.

llvm-svn: 163842
2012-09-13 21:32:58 +00:00
Richard Smith b9c5a60045 Implement C++11 [conv.prom]p4: an enumeration with a fixed underlying type has
integral promotions to both its underlying type and to its underlying type's
promoted type. This matters now that boolean conversions aren't permitted in
converted constant expressions (a la DR1407): an enumerator with a fixed
underlying type of bool still can be.

llvm-svn: 163841
2012-09-13 21:18:54 +00:00
Douglas Gregor c5c01a60c2 Don't perform template argument deduction against invalid templates;
it's likely to lead to a crash later on. Fixes PR12933 /
<rdar://problem/11525335>.

llvm-svn: 163838
2012-09-13 21:01:57 +00:00
Dmitri Gribenko b37d5e8a95 Comment parsing: handle \deprecated command. It is a block command, but it
should be fine to use it without further explanations in the attached
paragraph, so the warning about empty paragraph was turned off for it.

llvm-svn: 163836
2012-09-13 20:36:01 +00:00
Fariborz Jahanian a55f658a88 remove duplicate code.
llvm-svn: 163833
2012-09-13 20:26:40 +00:00
Douglas Gregor 43bc036e8a Promote the warning about extra qualification on a declaration from a
warning to an error. C++ bans it, and both GCC and EDG diagnose it as
an error. Microsoft allows it, so we still warn in Microsoft
mode. Fixes <rdar://problem/11135644>.

llvm-svn: 163831
2012-09-13 20:16:20 +00:00
Richard Smith b67ada6687 Remove speculative fix for C++ core issue 1407, since it was resolved as NAD.
llvm-svn: 163829
2012-09-13 19:55:13 +00:00
Ted Kremenek 5371c73cdf Fix grammar.
llvm-svn: 163828
2012-09-13 19:48:51 +00:00
Richard Smith 7696571d2b Recover properly after a parse error in a static_assert declaration.
llvm-svn: 163826
2012-09-13 19:12:50 +00:00
Richard Smith 659d38bcd5 Use a "better" unicode character, to avoid buildbot breakage on bots which can print some unicode characters.
llvm-svn: 163825
2012-09-13 19:10:51 +00:00
Fariborz Jahanian 1dfeacefbc Move back the stuff about missing ownership attribute warning
to SemaDeclObjC and apply some simplification per John's
comment. // rdar://12280826

llvm-svn: 163824
2012-09-13 18:53:14 +00:00
Richard Smith fab4b1a40c Make TextDiagnostic more robust against SourceLocations which point into the
middle of UTF-8 characters, and avoid walking to such positions when adjusting
column ranges for display. Fixes a couple of hangs when rendering diagnostics.

llvm-svn: 163820
2012-09-13 18:37:50 +00:00
Ted Kremenek e5c0a9bad4 When warning about unsafe uses of dispatch_once, specially handle the
crazy case where dispatch_once gets redefined as a macro that calls
_dispatch_once (which calls the real dispatch_once).  Users want to
see the warning in their own code.

Fixes <rdar://problem/11617767>

llvm-svn: 163816
2012-09-13 18:18:37 +00:00
Fariborz Jahanian bf38d880d6 Move no explicit ownership warning to SemaType.cpp.
// rdar://12280826

llvm-svn: 163813
2012-09-13 17:29:07 +00:00
Ted Kremenek 12c7799c55 Add tests for r163778.
llvm-svn: 163812
2012-09-13 17:25:51 +00:00
Silviu Baranga 157f7c6742 This patch introduces A15 as a target in Clang.
llvm-svn: 163804
2012-09-13 15:06:00 +00:00
NAKAMURA Takumi 3de4e8987e ASTMatchersMacros.h: Appease msvc.
llvm-svn: 163798
2012-09-13 14:28:23 +00:00
Daniel Jasper a6bc1f6d35 Create initial support for matching and binding NestedNameSpecifier(Loc)s.
Review: http://llvm-reviews.chandlerc.com/D39
llvm-svn: 163794
2012-09-13 13:11:25 +00:00
Dmitri Gribenko 8994e0c03d Fix Doxygen misuse: refer to parameter names in paragraphs correctly (\arg is
not what most people want -- it starts a new paragraph).

llvm-svn: 163793
2012-09-13 13:11:20 +00:00
Manuel Klimek 024e075597 Add missing accessor.
llvm-svn: 163792
2012-09-13 12:44:47 +00:00
Ted Kremenek b47e6bc597 Conditionally parse documentation comments in system headers by
passing -fretain-comments-from-system-headers.  By default, the
compiler no longer parses such documentation comments, as they
can result in a noticeable compile time/PCH slowdown.

Fixes <rdar://problem/11860820>.

llvm-svn: 163778
2012-09-13 06:41:18 +00:00
Eric Christopher 17674ec8c6 Properly link libpthread_p when using profiling on OpenBSD.
Patch by Brad Smith.

llvm-svn: 163777
2012-09-13 06:32:34 +00:00
NAKAMURA Takumi 4a7a5610ce InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.
llvm-svn: 163776
2012-09-13 05:53:23 +00:00
NAKAMURA Takumi 72f05bccc9 clang/lib/Analysis/ObjCNoReturn.cpp: Fix [-Wnewline-eof]
llvm-svn: 163775
2012-09-13 05:53:17 +00:00
Jordan Rose 4c266aa371 Format strings: offer a fixit for Darwin's %D/%U/%O to ISO %d/%u/%o.
<rdar://problem/12061922>

llvm-svn: 163772
2012-09-13 02:11:15 +00:00
Jordan Rose 510260c2bf Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o).
These will warn under -Wformat-non-iso, and will still be rejected
outright on other platforms.

<rdar://problem/12061922>

llvm-svn: 163771
2012-09-13 02:11:03 +00:00
Anna Zaks f6a5d793d2 [analyzer] Don't reimplement an existing function.
Thanks Jordan.

llvm-svn: 163762
2012-09-13 00:37:12 +00:00
Ted Kremenek edf22edca0 Teach -Wuninitialized to recognize common "noreturn" idioms in
Objective-C related to NSException.

Fixes <rdar://problem/12287498>

I debated whether or not this logic should be sunk into the CFG
itself.  It's not clear if we should, as different analyses may
wish to have different policies.  We can re-evaluate this in the
future.

llvm-svn: 163760
2012-09-13 00:21:35 +00:00