]> granicus.if.org Git - clang/log
clang
12 years ago[arcmt] Refactor PropertiesRewriter to use MigrationContext.
Argyrios Kyrtzidis [Sun, 6 Nov 2011 18:57:57 +0000 (18:57 +0000)]
[arcmt] Refactor PropertiesRewriter to use MigrationContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143882 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/Driver/crash-cleanup.c: Remove "XFAIL: mingw32" corresponding to r143876.
NAKAMURA Takumi [Sun, 6 Nov 2011 16:59:41 +0000 (16:59 +0000)]
test/Driver/crash-cleanup.c: Remove "XFAIL: mingw32" corresponding to r143876.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143877 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe version objects need to actually store the version strings; they
Chandler Carruth [Sun, 6 Nov 2011 10:51:30 +0000 (10:51 +0000)]
The version objects need to actually store the version strings; they
aren't guaranteed to live long enough otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143875 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThrow the switch and move all Linux header search over to the GCC
Chandler Carruth [Sun, 6 Nov 2011 10:31:01 +0000 (10:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143874 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a missing triple spotted by inspecting and testing of the include
Chandler Carruth [Sun, 6 Nov 2011 10:30:58 +0000 (10:30 +0000)]
Add a missing triple spotted by inspecting and testing of the include
path triples. Also order the 32-bit triples a bit more reasonably.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143873 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUnbreak gcc build.
Benjamin Kramer [Sun, 6 Nov 2011 09:50:13 +0000 (09:50 +0000)]
Unbreak gcc build.

For some reason clang and msvc accept this, but gcc doesn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143872 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLift the GCCVersion type into the header file and start persisting it in
Chandler Carruth [Sun, 6 Nov 2011 09:39:46 +0000 (09:39 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143871 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake format string 64 bit safe.
Benjamin Kramer [Sun, 6 Nov 2011 09:34:11 +0000 (09:34 +0000)]
Make format string 64 bit safe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143870 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch some of these interfaces from std::string to StringRef and Twine.
Chandler Carruth [Sun, 6 Nov 2011 09:21:54 +0000 (09:21 +0000)]
Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143869 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/Driver/crash-cleanup.c: Mark as XFAIL: mingw32, for investigating.
NAKAMURA Takumi [Sun, 6 Nov 2011 09:11:35 +0000 (09:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143868 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange the AST representation of operations on Objective-C
John McCall [Sun, 6 Nov 2011 09:01:30 +0000 (09:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTake a better approach to detecting and selecting multiarch include
Chandler Carruth [Sun, 6 Nov 2011 08:21:07 +0000 (08:21 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143866 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r143864, as the problem I was actually looking at can be solved
Chandler Carruth [Sun, 6 Nov 2011 08:21:04 +0000 (08:21 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143865 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStart pruning down the set of flags passed to CC1 for header search.
Chandler Carruth [Sun, 6 Nov 2011 07:31:36 +0000 (07:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143864 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis test was assuming that /usr/include was in the system header search
Chandler Carruth [Sun, 6 Nov 2011 06:59:15 +0000 (06:59 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143863 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoXFAIL crash-cleanup.c only on Darwin and msys.
Peter Collingbourne [Sun, 6 Nov 2011 04:32:01 +0000 (04:32 +0000)]
XFAIL crash-cleanup.c only on Darwin and msys.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143858 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoXFAIL test until Peter has a chance to investigate.
Chad Rosier [Sun, 6 Nov 2011 03:42:36 +0000 (03:42 +0000)]
XFAIL test until Peter has a chance to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143857 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFixing -g break caused by a dead reference to a temporary introduced in r143732.
David Blaikie [Sun, 6 Nov 2011 01:53:39 +0000 (01:53 +0000)]
Fixing -g break caused by a dead reference to a temporary introduced in r143732.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143856 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd the depfile as a result file so that it is deleted if we crash,
Peter Collingbourne [Sun, 6 Nov 2011 00:40:05 +0000 (00:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143846 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch Lit to directly query the driver for the builtin inclue path.
Chandler Carruth [Sat, 5 Nov 2011 23:29:28 +0000 (23:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143842 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEnhance the GCC version parsing and comparison logic to handle some more
Chandler Carruth [Sat, 5 Nov 2011 23:24:30 +0000 (23:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143841 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove a pointless member. I have no idea why I made this not a local
Chandler Carruth [Sat, 5 Nov 2011 22:23:14 +0000 (22:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143840 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove a no-longer needed helper function. Thanks for implementing this
Chandler Carruth [Sat, 5 Nov 2011 22:23:11 +0000 (22:23 +0000)]
Remove a no-longer needed helper function. Thanks for implementing this
Michael!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143839 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the GCC installation detection helper a member of the Linux
Chandler Carruth [Sat, 5 Nov 2011 22:07:51 +0000 (22:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143838 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove support for Gentoo subversion-ebuild installed llvm-gcc libstdc++
Chandler Carruth [Sat, 5 Nov 2011 21:26:18 +0000 (21:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143836 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach lit to ask the Clang it is running what version string to use
Chandler Carruth [Sat, 5 Nov 2011 20:55:50 +0000 (20:55 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143823 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the Linux header searching from the Frontend to the Driver. This is
Chandler Carruth [Sat, 5 Nov 2011 20:17:13 +0000 (20:17 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143822 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTry to reduce the nastiness that creeps in through Windows.h a bit.
Benjamin Kramer [Sat, 5 Nov 2011 17:43:55 +0000 (17:43 +0000)]
Try to reduce the nastiness that creeps in through Windows.h a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143816 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[driver] If we're only linking, don't warn about unused arguments which are
Chad Rosier [Sat, 5 Nov 2011 15:56:33 +0000 (15:56 +0000)]
[driver] If we're only linking, don't warn about unused arguments which are
obviously only used during compilation.
rdar://10386708

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143813 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCompute the path properly on different platforms. Specifically, compute
Chandler Carruth [Sat, 5 Nov 2011 10:41:42 +0000 (10:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143807 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange this test to reflect the state we are moving in. The Clang
Chandler Carruth [Sat, 5 Nov 2011 10:15:33 +0000 (10:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143806 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch these two tests to use the Clang driver instead of CC1. They want
Chandler Carruth [Sat, 5 Nov 2011 10:15:30 +0000 (10:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143805 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach Lit to pass the CC1 invocation the builtin include directory. This
Chandler Carruth [Sat, 5 Nov 2011 10:15:27 +0000 (10:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143804 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix markup weirdness.
Benjamin Kramer [Sat, 5 Nov 2011 10:11:36 +0000 (10:11 +0000)]
Fix markup weirdness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143803 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a significant oversight in my move of MSVC includes to the driver:
Chandler Carruth [Sat, 5 Nov 2011 09:24:44 +0000 (09:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143801 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNow that we have a portable 64 bit format string use it to make this simple again.
Benjamin Kramer [Sat, 5 Nov 2011 09:02:52 +0000 (09:02 +0000)]
Now that we have a portable 64 bit format string use it to make this simple again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143800 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd two flags to the CC1 layer that I was hoping to avoid. We need to
Chandler Carruth [Sat, 5 Nov 2011 08:30:29 +0000 (08:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143798 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTweak LookThroughStmt() in LiveVariables to properly look through alternativing Paren...
Ted Kremenek [Sat, 5 Nov 2011 07:34:28 +0000 (07:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143797 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLookThroughStmt GM release.
Argyrios Kyrtzidis [Sat, 5 Nov 2011 07:09:40 +0000 (07:09 +0000)]
LookThroughStmt GM release.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143796 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLookThroughStmt v4.6.3
Argyrios Kyrtzidis [Sat, 5 Nov 2011 07:06:54 +0000 (07:06 +0000)]
LookThroughStmt v4.6.3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143795 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSimplify LookThroughStmt in LiveVariables.cpp
Argyrios Kyrtzidis [Sat, 5 Nov 2011 07:03:54 +0000 (07:03 +0000)]
Simplify LookThroughStmt in LiveVariables.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143794 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix vector macros to correctly check argument types. <rdar://problem/10261670>
Bob Wilson [Sat, 5 Nov 2011 06:08:06 +0000 (06:08 +0000)]
Fix vector macros to correctly check argument types. <rdar://problem/10261670>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143792 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotests: Remove some stray and unused -cc1 flags. These tests appear to be written
Daniel Dunbar [Sat, 5 Nov 2011 05:41:57 +0000 (05:41 +0000)]
tests: Remove some stray and unused -cc1 flags. These tests appear to be written
to go through the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143791 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnother correction to the LiveVariables commit (r143767, r143780).
Anna Zaks [Sat, 5 Nov 2011 05:20:59 +0000 (05:20 +0000)]
Another correction to the LiveVariables commit (r143767, r143780).
Make test/Analysis/misc-ps.c test pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143790 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Relax the cmp criteria for analyzer reports.
Anna Zaks [Sat, 5 Nov 2011 05:20:56 +0000 (05:20 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143789 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add the list of available checkers to the website.
Anna Zaks [Sat, 5 Nov 2011 05:20:54 +0000 (05:20 +0000)]
[analyzer] Add the list of available checkers to the website.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143788 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] There should be a space between "expect" and "only"
Anna Zaks [Sat, 5 Nov 2011 05:20:51 +0000 (05:20 +0000)]
[analyzer] There should be a space between "expect" and "only"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143787 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add support for testing with individual preprocessed files.
Anna Zaks [Sat, 5 Nov 2011 05:20:48 +0000 (05:20 +0000)]
[analyzer] Add support for testing with individual preprocessed files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143786 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
Argyrios Kyrtzidis [Sat, 5 Nov 2011 04:03:43 +0000 (04:03 +0000)]
Fix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
switch statement, not the while loop).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143780 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] For "c-index-test -index-file", print out the names of the callbacks.
Argyrios Kyrtzidis [Sat, 5 Nov 2011 04:03:35 +0000 (04:03 +0000)]
[libclang] For "c-index-test -index-file", print out the names of the callbacks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143779 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOn Linux, enable the gold plugin if we are using LTO.
Peter Collingbourne [Sat, 5 Nov 2011 03:47:53 +0000 (03:47 +0000)]
On Linux, enable the gold plugin if we are using LTO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143778 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCorrect the grammar for __builtin_astype.
Peter Collingbourne [Sat, 5 Nov 2011 03:47:48 +0000 (03:47 +0000)]
Correct the grammar for __builtin_astype.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143777 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoserialized diagnostics: include FixIt information in serialized diagnostics.
Ted Kremenek [Sat, 5 Nov 2011 03:34:23 +0000 (03:34 +0000)]
serialized diagnostics: include FixIt information in serialized diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143776 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.
Akira Hatanaka [Sat, 5 Nov 2011 01:48:34 +0000 (01:48 +0000)]
Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143775 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix test so that it XFAILs consistently.
Eli Friedman [Sat, 5 Nov 2011 00:49:47 +0000 (00:49 +0000)]
Fix test so that it XFAILs consistently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143771 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix MSVC build.
Michael J. Spencer [Sat, 5 Nov 2011 00:46:46 +0000 (00:46 +0000)]
Fix MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143770 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix one last place where we weren't writing into a string literal consistently.
Eli Friedman [Sat, 5 Nov 2011 00:41:04 +0000 (00:41 +0000)]
Fix one last place where we weren't writing into a string literal consistently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143769 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix incorrect format string in debug output.
Eli Friedman [Sat, 5 Nov 2011 00:38:30 +0000 (00:38 +0000)]
Fix incorrect format string in debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143768 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach LiveVariables to look through OpaqueValueExprs for extending Stmt liveness.
Ted Kremenek [Sat, 5 Nov 2011 00:26:53 +0000 (00:26 +0000)]
Teach LiveVariables to look through OpaqueValueExprs for extending Stmt liveness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143767 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPer discussion with John McCall, don't add OpaqueValueExprs to the CFG.
Ted Kremenek [Sat, 5 Nov 2011 00:10:15 +0000 (00:10 +0000)]
Per discussion with John McCall, don't add OpaqueValueExprs to the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143766 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoserialized diagnostics: pull emission of filenames into diagnostic block.
Ted Kremenek [Sat, 5 Nov 2011 00:10:11 +0000 (00:10 +0000)]
serialized diagnostics: pull emission of filenames into diagnostic block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143765 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoserialized diagnostics: pull emission of diagnostic flag string into diagnostics...
Ted Kremenek [Sat, 5 Nov 2011 00:10:07 +0000 (00:10 +0000)]
serialized diagnostics: pull emission of diagnostic flag string into diagnostics block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143764 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSerialized diagnostics: pull category name serialization into diagnostic blocks....
Ted Kremenek [Sat, 5 Nov 2011 00:10:04 +0000 (00:10 +0000)]
Serialized diagnostics: pull category name serialization into diagnostic blocks.  The goal is to remove BLOCK_STRINGS so that the bitcode file can potentially be streamed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143763 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoserialized diagnostics: emit source ranges.
Ted Kremenek [Sat, 5 Nov 2011 00:10:01 +0000 (00:10 +0000)]
serialized diagnostics: emit source ranges.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143762 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove definition of record/block IDs for serialized diagnostics to public header.
Ted Kremenek [Sat, 5 Nov 2011 00:09:57 +0000 (00:09 +0000)]
Move definition of record/block IDs for serialized diagnostics to public header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143761 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSerialized diagnostics: encode a 24 bit version number as part of the "magic number...
Ted Kremenek [Sat, 5 Nov 2011 00:09:53 +0000 (00:09 +0000)]
Serialized diagnostics: encode a 24 bit version number as part of the "magic number" of serialized diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143760 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoserialized diagnostics: unique warning strings when emitting serialized diagnostics.
Ted Kremenek [Sat, 5 Nov 2011 00:09:50 +0000 (00:09 +0000)]
serialized diagnostics: unique warning strings when emitting serialized diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143759 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSerialized diagnostics: serialize "notes" as sub diagnostics of warnings and errors.
Ted Kremenek [Sat, 5 Nov 2011 00:09:47 +0000 (00:09 +0000)]
Serialized diagnostics: serialize "notes" as sub diagnostics of warnings and errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143758 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlso include file modification time and size in output of SerializedDiagnosticPrinter.
Ted Kremenek [Sat, 5 Nov 2011 00:09:43 +0000 (00:09 +0000)]
Also include file modification time and size in output of SerializedDiagnosticPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143757 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] Fix an assertion hit in rdar://10336125; a bit too complicated to reduce.
Argyrios Kyrtzidis [Sat, 5 Nov 2011 00:02:26 +0000 (00:02 +0000)]
[arcmt] Fix an assertion hit in rdar://10336125; a bit too complicated to reduce.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143754 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBegin the migration of header search logic to the driver, starting with
Chandler Carruth [Fri, 4 Nov 2011 23:49:05 +0000 (23:49 +0000)]
Begin the migration of header search logic to the driver, starting with
Windows. There are still FIXMEs and lots of problems with this code.
Some of them will be addressed shortly by my follow-up patches, but most
are going to wait until we isolate this code and can fix it properly.
This version should be no worse than what we had before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143752 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch the C++ include interface in the ToolChain to use the same naming
Chandler Carruth [Fri, 4 Nov 2011 23:49:01 +0000 (23:49 +0000)]
Switch the C++ include interface in the ToolChain to use the same naming
as the system include interface before I start adding implementations of
it to individual ToolChain implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143751 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCheck for invalid after calling getSLocEntry, for safety.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 23:43:06 +0000 (23:43 +0000)]
Check for invalid after calling getSLocEntry, for safety.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143748 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] In GC, error out when there is a call that returns a pointer to
Argyrios Kyrtzidis [Fri, 4 Nov 2011 23:43:03 +0000 (23:43 +0000)]
[arcmt] In GC, error out when there is a call that returns a pointer to
GC managed non-objc object memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143747 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn ARC, when applying an ownership to a non-objc pointer, instead of ignoring it
Argyrios Kyrtzidis [Fri, 4 Nov 2011 20:37:24 +0000 (20:37 +0000)]
In ARC, when applying an ownership to a non-objc pointer, instead of ignoring it
create an attributed type with same type as the original type.

We effectively retain the source info that an ownership attribute was present but the attribute
is ignored by not modifying the type that it was applied to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143736 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEnable -flimit-debug-info by default. Now, clang lazily emits debug info for structs...
Devang Patel [Fri, 4 Nov 2011 20:05:58 +0000 (20:05 +0000)]
Enable -flimit-debug-info by default. Now, clang lazily emits debug info for structs. Original behavior can be restored using -fno-limit-debug-info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143733 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[driver] Don't blindly accept all -g options.
Chad Rosier [Fri, 4 Nov 2011 19:28:44 +0000 (19:28 +0000)]
[driver] Don't blindly accept all -g options.
rdar://10383444

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143732 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r143551. It is causing g++.dg/template/crash52.C test failure.
Devang Patel [Fri, 4 Nov 2011 18:52:43 +0000 (18:52 +0000)]
Revert r143551. It is causing g++.dg/template/crash52.C test failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143725 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: fixed enum type is supported in objc mode.
Fariborz Jahanian [Fri, 4 Nov 2011 18:51:24 +0000 (18:51 +0000)]
objc: fixed enum type is supported in objc mode.
Fixes a bug where enumerator type is not this
fixed type. // rdar://10381507

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143724 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClean up C++11 constant expression testing.
Richard Smith [Fri, 4 Nov 2011 18:32:57 +0000 (18:32 +0000)]
Clean up C++11 constant expression testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143720 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd new test.
Devang Patel [Fri, 4 Nov 2011 17:12:03 +0000 (17:12 +0000)]
Add new test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143706 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd new test.
Devang Patel [Fri, 4 Nov 2011 16:57:26 +0000 (16:57 +0000)]
Add new test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143704 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] For GC, cleanup and turn -finalize to -dealloc.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:22 +0000 (15:58 +0000)]
[arcmt] For GC, cleanup and turn -finalize to -dealloc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143701 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] In GC, error for use of CFMakeCollectable because it will leak the
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:17 +0000 (15:58 +0000)]
[arcmt] In GC, error for use of CFMakeCollectable because it will leak the
object that it receives in ARC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143700 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn C++ keep unavailable function calls in the AST, like in C/ObjC.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:13 +0000 (15:58 +0000)]
In C++ keep unavailable function calls in the AST, like in C/ObjC.

This allows the migrator to visit and fix them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143699 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] In GC, transform NSMakeCollectable to CFBridgingRelease.
Argyrios Kyrtzidis [Fri, 4 Nov 2011 15:58:08 +0000 (15:58 +0000)]
[arcmt] In GC, transform NSMakeCollectable to CFBridgingRelease.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143698 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused variables.
Benjamin Kramer [Fri, 4 Nov 2011 15:05:51 +0000 (15:05 +0000)]
Remove unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143696 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSink the strange '-stdlib=...' flag handling into the C++ include
Chandler Carruth [Fri, 4 Nov 2011 07:43:33 +0000 (07:43 +0000)]
Sink the strange '-stdlib=...' flag handling into the C++ include
handling logic of the generic ToolChain. This flag, despite its name,
has *nothing* to do with the GCC flag '-nostdlib' that relates
(exclusively) to the linking behavior. It is a most unfortunate name in
that regard...

It is used to tell InitHeaderSearch.cpp *which* set of C++ standard
library header search paths to use -- those for libstdc++ from GCC's
installation, or those from a libc++ installation. As this logic is
hoisted out of the Frontend, and into the Driver as part of this
ToolChain, the generic method will be overridden for the platform, where
it can implement this logic directly. As such, hiding the CC1 option
passing in the generic space is a natural fit despite the odd naming.

Also, expand on the comments to clarify whats going on, and tidy up the
Tools.cpp code now that its simpler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143687 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
Chandler Carruth [Fri, 4 Nov 2011 07:34:47 +0000 (07:34 +0000)]
Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
implementation in the driver. This cleans up the signature and semantics
of the include flag adding component of the toolchain. Another step to
ready it for holding all the InitHeaderSearch logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143686 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a FIXME to cleanup the CPATH handling. It's currently burried with
Chandler Carruth [Fri, 4 Nov 2011 07:12:58 +0000 (07:12 +0000)]
Add a FIXME to cleanup the CPATH handling. It's currently burried with
the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the
driver profitably, removing more noise from the driver -> frontend
communication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143685 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a system include management interface to the toolchain, and call it
Chandler Carruth [Fri, 4 Nov 2011 07:12:53 +0000 (07:12 +0000)]
Add a system include management interface to the toolchain, and call it
and the C++ include management routine from the proper place when
forming preprocessor options in the driver. This is the first step to
teaching the driver to manage all of the header search paths. Currently,
these methods remain just stubs in the abstract toolchain. Subsequent
patches will flesh them out with implementations for various toolchains
based on the current code in InitHeaderSearch.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143684 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstant expression evaluation: refactor to start the groundwork for coping with
Richard Smith [Fri, 4 Nov 2011 05:33:44 +0000 (05:33 +0000)]
Constant expression evaluation: refactor to start the groundwork for coping with
initializations which refer indirectly to elements of the object being
initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143680 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstant expression evaluation: track the manner in which an lvalue was written,
Richard Smith [Fri, 4 Nov 2011 02:25:55 +0000 (02:25 +0000)]
Constant expression evaluation: track the manner in which an lvalue was written,
to allow us to implement the C++11 rule that a non-active union member can't be
read, and use it to implement subobject access for string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143677 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstant expression evaluation: although we don't know whether a literal will
Richard Smith [Fri, 4 Nov 2011 01:10:57 +0000 (01:10 +0000)]
Constant expression evaluation: although we don't know whether a literal will
be at the same address as another object, we do know it won't alias a null
pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143674 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn the AST dump, add a space between the type and value for CharacterLiteral.
Richard Trieu [Thu, 3 Nov 2011 23:56:23 +0000 (23:56 +0000)]
In the AST dump, add a space between the type and value for CharacterLiteral.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143667 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse a single integer type for a sub-doubleword part of a byval structure.
Akira Hatanaka [Thu, 3 Nov 2011 23:31:00 +0000 (23:31 +0000)]
Use a single integer type for a sub-doubleword part of a byval structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143666 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix alignment on alloca's for parameters using ABIArgInfo::Expand.
Eli Friedman [Thu, 3 Nov 2011 21:39:02 +0000 (21:39 +0000)]
Fix alignment on alloca's for parameters using ABIArgInfo::Expand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143658 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoParse the warning options twice. The first pass sets diagnostic state, while
Chad Rosier [Thu, 3 Nov 2011 21:23:39 +0000 (21:23 +0000)]
Parse the warning options twice.  The first pass sets diagnostic state, while
the second pass reports warnings/errors.  This has the effect that we follow
the more canonical "last option wins" paradigm when there are conflicting
options.
rdar://10383776

Previously, we parsed the warning options in order.  This caused non-intuitive
behavior:

1) clang test.c -Wnosuchwarning -Wno-unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
[0 warning generated.]

2) clang test.c -Wnosuchwarning -Werror=unknown-warning-option
Before:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
1 warning generated.
After:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]

3) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
After:
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
warning: unknown warning option '-Wnosuchwarning' [-Wunknown-warning-option]
2 warnings generated.

4) clang test.c -Werror=unknown-warning-option -Wnosuchwarning -Wno-error=unknown-warning-option -Wno-unknown-warning-option -Wnosuchwarning
Before:
error: unknown warning option '-Wnosuchwarning' [-Werror,-Wunknown-warning-option]

After:
[0 warning generated.]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143657 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAfter resetting the diagnostic state, set the number of warning occurring in the...
Argyrios Kyrtzidis [Thu, 3 Nov 2011 20:57:33 +0000 (20:57 +0000)]
After resetting the diagnostic state, set the number of warning occurring in the preamble.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143647 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix the alignment on scalar parameter variables so that it matches what the AST think...
Eli Friedman [Thu, 3 Nov 2011 20:31:28 +0000 (20:31 +0000)]
Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be.  Per report on cfe-dev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143645 91177308-0d34-0410-b5e6-96231b3b80d8