Commit Graph

33885 Commits

Author SHA1 Message Date
Bob Wilson 98bc98caa8 Clean up type flags for overloaded Neon builtins. No functional change.
This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now.  Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.

llvm-svn: 144054
2011-11-08 01:16:11 +00:00
Anna Zaks ae9d54bcf3 [analyzer] Testing infrastructure: flush the output between projects.
llvm-svn: 144051
2011-11-08 00:27:56 +00:00
John McCall cfef546d40 There are some crazy cases that LookupMethodInReceiverType
doesn't duplicate, but they all surface as implicit
properties.  It's also a useful optimization to not
duplicate the implicit getter lookup.  So, trust the
getter lookup that was already done in these cases.

llvm-svn: 144031
2011-11-07 22:49:50 +00:00
Anna Zaks 9fed084503 [analyzer] Make sure scan-build catches all clang failures.
scan-build ignores clang failures in some cases, which might lead to
silent failure suppression. For example, if clang command line
argument is wrong. (Addresses radar://10406598)

llvm-svn: 144029
2011-11-07 22:38:10 +00:00
Richard Smith eda3c84698 constexpr: static data members declared constexpr are required to have an
initializer; all other constexpr variables are merely required to be
initialized. In particular, a user-provided constexpr default constructor can be
used for such initialization.

llvm-svn: 144028
2011-11-07 22:16:17 +00:00
Douglas Gregor 5d1b4e3d1f When we notice that a member function is defined with "= delete" or "=
default", make a note of which is used when creating the
initial declaration. Previously, we would wait until later to handle
default/delete as a definition, but this is too late: when adding the
declaration, we already treated the declaration as "user-provided"
when in fact it was merely "user-declared".

Fixes PR10861 and PR10442, along with a bunch of FIXMEs.

llvm-svn: 144011
2011-11-07 20:56:01 +00:00
Chad Rosier 8fe3b115cd Whitespace.
llvm-svn: 144002
2011-11-07 19:52:29 +00:00
Chad Rosier 1746e37cb8 Tablegenify -g options.
llvm-svn: 144001
2011-11-07 19:51:54 +00:00
Richard Trieu 09d3af4c2b Remove test with int128 printing since it breaks on some platforms.
llvm-svn: 143997
2011-11-07 19:30:35 +00:00
Douglas Gregor 80357c6227 Add missing part of test
llvm-svn: 143985
2011-11-07 18:54:12 +00:00
Douglas Gregor 61d63d0fd7 ASTConsumer::handleTopLevelDecl will end up getting called for
function template instantiations. Fixes <rdar://problem/10398005> / PR11312.

llvm-svn: 143984
2011-11-07 18:53:57 +00:00
Argyrios Kyrtzidis d569791c44 [arcmt] Fix handling NSMakeCollectable inside an objc method.
llvm-svn: 143980
2011-11-07 18:46:50 +00:00
Argyrios Kyrtzidis 722d21c646 [arcmt] In GC, handle (assign) @properties.
-Move __strong/__weak added to a property type to the property attribute,
e.g.  "@property (assign) __weak Foo *prop;" --> "@property (weak) Foo *prop;"

-Remove (assign) in a property so that it becomes strong-by-default in ARC.

llvm-svn: 143979
2011-11-07 18:46:46 +00:00
Argyrios Kyrtzidis 0dd98a4c51 [arcmt] Map property decls to their GC attributes.
llvm-svn: 143978
2011-11-07 18:40:32 +00:00
Richard Trieu 8b626ba6de Add support for printing integer literals of type short, unsigned short,
__int128_t and __uint128_t.  Short and unsigned short integer literals support
is only to work around a crasher as reported in PR11179 and will be removed
once Clang no longer builds short integer literals.

llvm-svn: 143977
2011-11-07 18:40:31 +00:00
Argyrios Kyrtzidis e80d4f228c [arcmt] In GC, change '__weak' -> '__unsafe_unretained' when applied
to objects of classes that don't support ARC weak

llvm-svn: 143976
2011-11-07 18:40:29 +00:00
Argyrios Kyrtzidis fed29142ba When applying ARC __weak to a non-objc pointer, do not give error that
__weak is unsupported by the deployment target, since it is going to be
ignored anyway.

Makes it easier for incremental migration from GC.

llvm-svn: 143975
2011-11-07 18:40:21 +00:00
Matt Beaumont-Gay 50da84bdb9 Better fix for -Wnon-virtual-dtor
llvm-svn: 143972
2011-11-07 18:30:47 +00:00
Matt Beaumont-Gay 4703a29e4a Remove duplicate listings for core.DivideZero
llvm-svn: 143969
2011-11-07 18:00:03 +00:00
Douglas Gregor 4109afa1f1 Drastically simplify the mapping from the declaration corresponding to
the injected-class-name of a class (or class template) to the
declaration that results from substituting the given template
arguments. Previously, we would actually perform a substitution into
the injected-class-name type and then retrieve the resulting
declaration. However, in certain, rare circumstances involving
deeply-nested member templates, we would get the wrong substitution
arguments.

This new approach just matches up the declaration with a declaration
that's part of the current context (or one of its parents), which will
either be an instantiation (during template instantiation) or the
declaration itself (during the definition of the template). This is
both more efficient (we're avoiding a substitution) and more correct
(we can't get the template arguments wrong in the member-template
case). 

Fixes <rdar://problem/9676205>.

Reinstated, now that we have the fix in r143967.

llvm-svn: 143968
2011-11-07 17:43:18 +00:00
Douglas Gregor df593fbeda Tighten up the conditions under which we consider ourselves to be
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.

llvm-svn: 143967
2011-11-07 17:33:42 +00:00
Matt Beaumont-Gay 43e15ff357 Appease -Wnon-virtual-dtor
llvm-svn: 143965
2011-11-07 17:16:31 +00:00
Benjamin Kramer f5fbe436bc Fix an unsafe use of Twine.
llvm-svn: 143962
2011-11-07 16:02:25 +00:00
Richard Smith f3e9e43da4 Constant expression evaluation: support for arrays.
llvm-svn: 143922
2011-11-07 09:22:26 +00:00
Chandler Carruth a62ba81682 Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.

llvm-svn: 143917
2011-11-07 09:17:31 +00:00
Chandler Carruth f470173e46 Fix Linux libc++ usage. Somehow this slipped through during the port.
Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...

llvm-svn: 143916
2011-11-07 09:01:17 +00:00
Richard Smith bcb4eb2813 Fix 32-bit build bots and remove some casting-away-const warnings.
llvm-svn: 143914
2011-11-07 07:31:09 +00:00
David Blaikie 103a3a03a2 Colorize. (this is consistent with the coloring in diagnostics.html, but perhaps that's a bit out of date because it doesn't look like current clang behavior)
llvm-svn: 143913
2011-11-07 06:28:33 +00:00
Anna Zaks 82a5b7bd25 [analyzer] Add the Checker Developer Manual to the menu.
It's still under construction but has enough info to be useful.

llvm-svn: 143912
2011-11-07 05:40:51 +00:00
Anna Zaks 5259086b8e [analyzer] Add overview and checker registration to the checker developer manual.
llvm-svn: 143911
2011-11-07 05:36:29 +00:00
John McCall ffc8ca2d84 Rip out CK_GetObjCProperty.
llvm-svn: 143910
2011-11-07 05:09:54 +00:00
Richard Smith 8081560048 Constant expression evaluation: preserve subobject designator when flattening a
core constant value down to an APValue.

llvm-svn: 143909
2011-11-07 05:07:52 +00:00
John McCall c109a259d2 Rip the ObjCPropertyRef l-value kind out of IR-generation.
llvm-svn: 143908
2011-11-07 03:59:57 +00:00
David Blaikie 8c045bcf9d Remove duplicate word & unnecessary conditional.
llvm-svn: 143907
2011-11-07 03:30:03 +00:00
David Blaikie b06c68d320 Move tests to the appropriate directory to match the spec hierarchy.
llvm-svn: 143906
2011-11-07 03:27:58 +00:00
Richard Smith a08acd8588 Allow constexpr variables' initializers to be folded in C++11 mode. This
partially undoes the revert in r143491, but does not introduce any new instances
of the underlying issue (which is not yet fixed) in code which does not use
the 'constexpr' keyword.

llvm-svn: 143905
2011-11-07 03:22:51 +00:00
Chandler Carruth efad16ad6b Begin lifting some of the one-off checking logic into generic helper
routines on the base toolchain class.

llvm-svn: 143900
2011-11-06 23:39:37 +00:00
Chandler Carruth 4c90fba23e Move the GCC installation detection logic down into the Generic_GCC
toolchain. The logic is mostly generic already, and where possible
should be made more generic. Also, it has no impact other than to expose
a set of methods which each toolchain can then query to setup their
desired configuration. These should be available to toolchains beyond
just Linux.

llvm-svn: 143899
2011-11-06 23:39:34 +00:00
Chandler Carruth 0c0981ee47 Remove an old OpenSUSE hack that is no longer needed -- it is exactly
the same as a directory added further down in the new logic.

llvm-svn: 143897
2011-11-06 23:10:49 +00:00
Chandler Carruth d0b93d6daf Remove the HasMultilib check. It was essentially useless. The driver now
looks for evidence of a multilib installation, and adds the appropriate
bits to the search paths.

llvm-svn: 143896
2011-11-06 23:09:05 +00:00
David Blaikie 876657b9c8 Correcting grammar.
llvm-svn: 143894
2011-11-06 22:28:03 +00:00
Benjamin Kramer 44f91da8cc Use StringRef's case transformation methods.
llvm-svn: 143889
2011-11-06 20:36:48 +00:00
Argyrios Kyrtzidis f233dac67c [arcmt] In GC, error for __strong/__weak on non-objc pointers.
llvm-svn: 143887
2011-11-06 18:58:23 +00:00
Argyrios Kyrtzidis 0c233fa23e [arcmt] In GC, clear redundant __strong's.
llvm-svn: 143886
2011-11-06 18:58:17 +00:00
Argyrios Kyrtzidis b458ffb226 Make sure when setting AttributesAsWritten of a property that they do not
include ownership qualifiers from the type.

llvm-svn: 143885
2011-11-06 18:58:12 +00:00
Argyrios Kyrtzidis aa421ea8af [arcmt] Make PropertiesRewriter::getPropertyType return the unqualified type.
llvm-svn: 143884
2011-11-06 18:58:07 +00:00
Argyrios Kyrtzidis e43ae79038 [arcmt] Collect all the places where GC attributes __strong/__weak occur.
llvm-svn: 143883
2011-11-06 18:58:03 +00:00
Argyrios Kyrtzidis aaa999660b [arcmt] Refactor PropertiesRewriter to use MigrationContext.
llvm-svn: 143882
2011-11-06 18:57:57 +00:00
NAKAMURA Takumi 04d581665e test/Driver/crash-cleanup.c: Remove "XFAIL: mingw32" corresponding to r143876.
llvm-svn: 143877
2011-11-06 16:59:41 +00:00
Chandler Carruth 0ad080e720 The version objects need to actually store the version strings; they
aren't guaranteed to live long enough otherwise.

llvm-svn: 143875
2011-11-06 10:51:30 +00:00
Chandler Carruth f5d4df9e44 Throw the switch and move all Linux header search over to the GCC
detection system that is providing the library paths and crt object
files.

This, modulo any bugs that need to be shaken out, resolves numerous bugs
with how we handle header paths. Here are a few that I know of:
- We no longer need to enumerate all GCC versions searched.
- OpenSUSE searched GCC versions in the wrong order.
- There were typos when selecting various patterns, etc.
- We aren't stating quite some many directories now.
- SysRoot didn't always work in a reasonable way.

I'm working on tests for this, but the tests are making me and Lit sad.
The real testing for this type of driver change is to try it out on
various distributions. I'll hit the common ones right away, and start
more thorough testing tomorrow after some sleep.

llvm-svn: 143874
2011-11-06 10:31:01 +00:00
Chandler Carruth 7e62da2845 Add a missing triple spotted by inspecting and testing of the include
path triples. Also order the 32-bit triples a bit more reasonably.

llvm-svn: 143873
2011-11-06 10:30:58 +00:00
Benjamin Kramer 5c29d69588 Unbreak gcc build.
For some reason clang and msvc accept this, but gcc doesn't.

llvm-svn: 143872
2011-11-06 09:50:13 +00:00
Chandler Carruth d95843aa8a Lift the GCCVersion type into the header file and start persisting it in
the detected GCC installation. This allows us to expose another aspect
of what we detected: the GCC version. This will be used shortly.

llvm-svn: 143871
2011-11-06 09:39:46 +00:00
Benjamin Kramer 867e40135a Make format string 64 bit safe.
llvm-svn: 143870
2011-11-06 09:34:11 +00:00
Chandler Carruth 4be70dd963 Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them.

llvm-svn: 143869
2011-11-06 09:21:54 +00:00
NAKAMURA Takumi aee36a196a test/Driver/crash-cleanup.c: Mark as XFAIL: mingw32, for investigating.
"XFAIL: msys" has no effect, due to XFAIL inspects triplet, and msys build does not use *-msys-* but *-mingw32.

llvm-svn: 143868
2011-11-06 09:11:35 +00:00
John McCall fe96e0b6be Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions.  It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST.  I've gone ahead and simplified the
ObjC rewriter's use of properties;  other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily.  Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.

llvm-svn: 143867
2011-11-06 09:01:30 +00:00
Chandler Carruth 5b77c6c618 Take a better approach to detecting and selecting multiarch include
directories. This way we stop at the first multiarch directory found on
the system. This achieves the real intended result of pruning
non-existent directories.

llvm-svn: 143866
2011-11-06 08:21:07 +00:00
Chandler Carruth 5da43e83d2 Revert r143864, as the problem I was actually looking at can be solved
a better way. The more I think about it the more worried I am that this
hammer is simply too large. We should only be reaching out to the
filesystem when doing interesting "detection" things, not gratuitously.

Original commit message:
Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

llvm-svn: 143865
2011-11-06 08:21:04 +00:00
Chandler Carruth 28e39d4b17 Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

llvm-svn: 143864
2011-11-06 07:31:36 +00:00
Chandler Carruth 996cb8ad84 This test was assuming that /usr/include was in the system header search
path. That assumption should never have been true, but it was until
I fixed it. Now that its fixed, add a triple here to get correct
behavior even on Windows.

llvm-svn: 143863
2011-11-06 06:59:15 +00:00
Peter Collingbourne ae6b2f44c3 XFAIL crash-cleanup.c only on Darwin and msys.
llvm-svn: 143858
2011-11-06 04:32:01 +00:00
Chad Rosier 7533488f62 XFAIL test until Peter has a chance to investigate.
llvm-svn: 143857
2011-11-06 03:42:36 +00:00
David Blaikie a54e9643ef Fixing -g break caused by a dead reference to a temporary introduced in r143732.
llvm-svn: 143856
2011-11-06 01:53:39 +00:00
Peter Collingbourne 9b515cb0ec Add the depfile as a result file so that it is deleted if we crash,
and prevent the diagnostic preprocessor run from writing a depfile.

llvm-svn: 143846
2011-11-06 00:40:05 +00:00
Chandler Carruth 34146d8ca7 Switch Lit to directly query the driver for the builtin inclue path.
Thanks to Peter for pointing out how easy this is to do. I'm now much
happier with this solution.

llvm-svn: 143842
2011-11-05 23:29:28 +00:00
Chandler Carruth bff1e8d53d Enhance the GCC version parsing and comparison logic to handle some more
edge cases and have better behavior. Specifically, we should actually
prefer the general '4.6' version string over the '4.6.1' string, as
'4.6.2' should be able to replace it without breaking rpaths or any
other place that these paths have been embedded. Debian-based
distributions are already using a path structure with symlinks to
achieve in-place upgrades for patch versions. Now our parsing reflects
this and we select the shorter paths instead of the longer paths.

A separate issue was that we would not parse a leading patch version
number even in the presence of a suffix. The above change makes this
more problematic as it would cause a suffix being added to make us treat
the entire thing as patch-version-agnostic, which it isn't. This changes
the logic to distinguish between '4.4.x' and 4.4.1-x', and retain that
the latter has *some* patch number information. Currently, we always
bias toward the shorter and more canonical version strings. If it
becomes important we can add more Debian like rules to produce sequences
such as '4.4.1b' > '4.4.1' > '4.4.1-rc3' > '4.4.1-rc2' > '4.4.1-pre5',
but I'm very doubtful this will ever matter or be desirable.

I've made the tests for this logic a bit more interesting, and added
some specific tests for logic that is now different.

llvm-svn: 143841
2011-11-05 23:24:30 +00:00
Chandler Carruth 4dfcf4ccf4 Remove a pointless member. I have no idea why I made this not a local
variable to begin with... As I'm planning to add include root
information to this object, this would have caused confusion. It didn't
even *actually* hold the include root by the time we were done with it.

llvm-svn: 143840
2011-11-05 22:23:14 +00:00
Chandler Carruth 2a750a0801 Remove a no-longer needed helper function. Thanks for implementing this
Michael!

llvm-svn: 143839
2011-11-05 22:23:11 +00:00
Chandler Carruth 14dd5ffcbf Move the GCC installation detection helper a member of the Linux
toolchain instead of merely using it in the constructor. This will allow
us to query it when building include paths as well as the file search
paths built in the constructor. I've lifted as little of it as I could
into the header file.

Eventually this will likely sink down into some of the Generic
toolchains and be used on more platforms, but I'm starting on Linux so
I can work out all the APIs needed there, where it is easiest to test
and we have the most pressing need.

llvm-svn: 143838
2011-11-05 22:07:51 +00:00
Chandler Carruth a95f344b3e Remove support for Gentoo subversion-ebuild installed llvm-gcc libstdc++
headers. As llvm-gcc is dead, and I have no idea if this ever really
worked, I think it's time for it to go. More importantly, it makes it
harder to generalize the include search logic. If someone really wants
these to work, they can set the CPLUS_INCLUDE_PATH environment variable.

llvm-svn: 143836
2011-11-05 21:26:18 +00:00
Chandler Carruth 2837f667e0 Teach lit to ask the Clang it is running what version string to use
rather than presuming that it is 3.0. This is extra important as the
version should be 3.1, but CMake hasn't caught up with the times.
That'll be fixed in a separate commit.

llvm-svn: 143823
2011-11-05 20:55:50 +00:00
Chandler Carruth a796f53821 Move the Linux header searching from the Frontend to the Driver. This is
the first (and diff-noisiest) step to making Linux header searching
tremendously more principled and less brittle. Note that this step
should have essentially no functional impact. We still search the exact
same set of paths in the exact same order. The only change here is where
the code implementing such a search lives.

This has one obvious negative impact -- we now pass a ludicrous number
of flags to the CC1 layer. That should go away as I re-base this logic
on the logic to detect a GCC installation. I want to do this in two
phases so the bots can tell me if this step alone breaks something, and
so that the diffs of the refactoring make more sense.

llvm-svn: 143822
2011-11-05 20:17:13 +00:00
Benjamin Kramer 6ff181ef3c Try to reduce the nastiness that creeps in through Windows.h a bit.
llvm-svn: 143816
2011-11-05 17:43:55 +00:00
Chad Rosier cda5732e52 [driver] If we're only linking, don't warn about unused arguments which are
obviously only used during compilation.
rdar://10386708

llvm-svn: 143813
2011-11-05 15:56:33 +00:00
Chandler Carruth afd2441f60 Compute the path properly on different platforms. Specifically, compute
it the exact same way that the Clang code computes this path.

Hopefully with this, the MSVC bots will actually come back to life.

llvm-svn: 143807
2011-11-05 10:41:42 +00:00
Chandler Carruth 979272c01c Change this test to reflect the state we are moving in. The Clang
builtin headers are no longer going to receive the old 'implicit extern
"C" block' semantics. This hint is actually ignored by both Clang and
GCC at this point, and Clang's own builtin headers can simply be changed
if there is any issue with this. Clang should be free to include these
however it wants, and so shorter and simpler is better.

Note: *nothing* is changing about the *system* stddef.h include. That
should always have the exact same include semantics, whether with Clang
or GCC or any other compiler. Only the compiler-builtin header search
path is changing.

If anyone knows of some risk that this introduces that I've not thought
of, please chime in. So far, only Windows has switched to the Brave New
World, but others should be switching soon.

llvm-svn: 143806
2011-11-05 10:15:33 +00:00
Chandler Carruth e3fcb6981f Switch these two tests to use the Clang driver instead of CC1. They want
to do "realistic" includes, and so need the header search logic now in
the driver. This in turn requires switching the CC1 options to the
actual driver options, and passing -Xclang where there is no analogy.

llvm-svn: 143805
2011-11-05 10:15:30 +00:00
Chandler Carruth c0b1b86ff4 Teach Lit to pass the CC1 invocation the builtin include directory. This
is a pretty gross hack, but I don't have any significantly cleaner ideas
for this. There are several things obviously gross about it:

1) Lit shouldn't know that Clang needs this. This really that bad, as
   Lit already knows about CC1 and other internal details.
2) This hard codes the '3.0' version number, which is pretty lame.
3) This hard codes every other aspect of the resource dir structure
   which is less lame than the version number, but still not great.

However, it should bring the MSVC tests back to life, and it should
unblock the rest of the move from Frontend to Driver, so I think it's
worth a bit of grossness that is isolated in our testing infrastructure
while we figure out the best long term approach. I have the following
ideas, some of which only solve part of the problem (and thus might need
to be combined with other ideas):

a) Create a symlink or other convenience path instead of a version
   number.
b) Run 'clang' directly in the lit.cfg, look at its resource dir, and use
   that.
c) Switch all the tests to use the driver instead of CC1.
d) Hack the frontend to synthesize builtin include directories when none
   are provided by the driver.

I don't like (d) because it feels very hackish and likely to break. We
can only solve a small part of the problem with (a). I wanted to vote
for (c), but lots of the tests in this bucket are really heavily using
internal-only flags like -verify and -triple. I'm loath to complicate
them with the full driver layer. Also, switching them to the driver adds
more than just builtin headers, but all of the rest of the system
headers!

This leaves me with (b). If others like (b), I'll switch to it, but it
felt a bit icky. Nothing concrete, and the other options look
significantly worse, but I felt icky enough that I wanted to start with
a more brain-dead patch to stop the bleeding, and gauge others' feelings
here.

llvm-svn: 143804
2011-11-05 10:15:27 +00:00
Benjamin Kramer 1c9e158120 Fix markup weirdness.
llvm-svn: 143803
2011-11-05 10:11:36 +00:00
Chandler Carruth d9e10ecb68 Fix a significant oversight in my move of MSVC includes to the driver:
actually manage the builtin header file includes as well as the system
ones.

This one is actually debatable whether it belongs in the driver or not,
as the builtin includes are really an internal bit of implementation
goop for Clang. However, they must be included at *exactly* the right
point in the sequence of header files, which makes it essentially
impossible to have this be managed by the Frontend and the rest by the
Driver. I have terrible ideas that would "work", but I think they're
worse than putting this in the driver and making the Frontend library
even more ignorant of the environment and system on which it is being
run.

Also fix the fact that we weren't properly respecting the flags which
suppress standard system include directories.

Note that this still leaves all of the Clang tests which run CC1
directly and include builtin header files broken on Windows. I'm working
on a followup patch to address that.

llvm-svn: 143801
2011-11-05 09:24:44 +00:00
Benjamin Kramer 96ad717226 Now that we have a portable 64 bit format string use it to make this simple again.
llvm-svn: 143800
2011-11-05 09:02:52 +00:00
Chandler Carruth 611cb64453 Add two flags to the CC1 layer that I was hoping to avoid. We need to
encode the *exact* semantics which the header search paths internally
built by the Frontend layer have had, which is both non-user-provided,
and at times adding the implicit extern "C" bit to the directory entry.

There are lots of CC1 options that are very close, but none do quite
this, and they are all already overloaded for other purposes. In some
senses this makes the command lines more clean as it clearly indicates
which flags are exclusively used to implement internal detection of
"standard" header search paths.

Lots of the implementation of this is really crufty, due to the
surrounding cruft. It doesn't seem worth investing lots of time cleaning
this up as it isn't new, and hopefully *lots* of this code will melt
away as header search inside of the frontend becomes increasingly
trivial.

llvm-svn: 143798
2011-11-05 08:30:29 +00:00
Ted Kremenek 977e30d1c4 Tweak LookThroughStmt() in LiveVariables to properly look through alternativing ParenExprs and OpaqueValueExprs. Thanks to Anna and Argiris for iterating on this function. My original patch embarssingly didn't even pass the Clang tests.
llvm-svn: 143797
2011-11-05 07:34:28 +00:00
Argyrios Kyrtzidis c843fd2afb LookThroughStmt GM release.
llvm-svn: 143796
2011-11-05 07:09:40 +00:00
Argyrios Kyrtzidis e2cbe86dc4 LookThroughStmt v4.6.3
llvm-svn: 143795
2011-11-05 07:06:54 +00:00
Argyrios Kyrtzidis 6b4fa1b4d6 Simplify LookThroughStmt in LiveVariables.cpp
llvm-svn: 143794
2011-11-05 07:03:54 +00:00
Bob Wilson c9b97cc1da Fix vector macros to correctly check argument types. <rdar://problem/10261670>
llvm-svn: 143792
2011-11-05 06:08:06 +00:00
Daniel Dunbar b3675dd660 tests: Remove some stray and unused -cc1 flags. These tests appear to be written
to go through the driver.

llvm-svn: 143791
2011-11-05 05:41:57 +00:00
Anna Zaks 04994959a3 Another correction to the LiveVariables commit (r143767, r143780).
Make test/Analysis/misc-ps.c test pass.

llvm-svn: 143790
2011-11-05 05:20:59 +00:00
Anna Zaks 84726dd72c [analyzer] Relax the cmp criteria for analyzer reports.
Until we find out a way to easily find out what changed by looking at the logs.

llvm-svn: 143789
2011-11-05 05:20:56 +00:00
Anna Zaks 2ad0b0f815 [analyzer] Add the list of available checkers to the website.
llvm-svn: 143788
2011-11-05 05:20:54 +00:00
Anna Zaks 62c650f477 [analyzer] There should be a space between "expect" and "only"
llvm-svn: 143787
2011-11-05 05:20:51 +00:00
Anna Zaks 4720a730f6 [analyzer] Add support for testing with individual preprocessed files.
llvm-svn: 143786
2011-11-05 05:20:48 +00:00
Argyrios Kyrtzidis 3c89fdae03 Fix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
switch statement, not the while loop).

llvm-svn: 143780
2011-11-05 04:03:43 +00:00
Argyrios Kyrtzidis 8c25804ce1 [libclang] For "c-index-test -index-file", print out the names of the callbacks.
llvm-svn: 143779
2011-11-05 04:03:35 +00:00
Peter Collingbourne 4a089ad86d On Linux, enable the gold plugin if we are using LTO.
llvm-svn: 143778
2011-11-05 03:47:53 +00:00
Peter Collingbourne 62c219809c Correct the grammar for __builtin_astype.
llvm-svn: 143777
2011-11-05 03:47:48 +00:00
Ted Kremenek d89a827b5c serialized diagnostics: include FixIt information in serialized diagnostics.
llvm-svn: 143776
2011-11-05 03:34:23 +00:00