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

37848 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek b8971b2781 Add hack (provided by Jonathan Sauer) to fall back to assuming Xcode is installed in /Developer
when using Python < 2.7.0.  This is the case on Snow Leopard, where the tools are always
installed in /Developer.  This isn't a proper fix for really figuring out where Xcode
is installed, but should work to fix an obvious problem on Snow Leopard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 21:39:29 +00:00
Ted Kremenek 3b71176b17 This test appears to be passing on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160320 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 21:17:01 +00:00
Jordan Rose 6f977c3e79 Don't crash when emitting fixits following Unicode characters.
This code is very sensitive to the difference between "columns" as printed
and "bytes" (SourceManager columns). All variables are now named explicitly
and our assumptions are (hopefully) documented as both comment and assertion.

Whether parseable fixits should use byte offsets or Unicode character counts
is pending discussion on the mailing list; currently the implementation uses
bytes (and has no problems on lines containing multibyte characters).
This has been added to the user manual.

<rdar://problem/11877454>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160319 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:52:12 +00:00
David Blaikie 980343b9a1 Simplify float comparison checks by using early return.
Found while investigating PR13330

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160318 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:47:22 +00:00
Ted Kremenek b2d8e63d3b Fix copy-paste mistake for CMake dependency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160315 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:22:15 +00:00
Anna Zaks 7acc407240 [analyzer] Make CmpRuns external-user friendly.
CmpRuns can be used for static analyzer bug report comparison. However,
we want to make sure external users do not rely on the way bugs are
represented (plist files). Make sure that we have a user
friendly/documented API for CmpRuns script.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:21:42 +00:00
Ted Kremenek 61918d8281 Looks like libTooling might also depend on ClangDiagnosticCommon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 19:44:15 +00:00
Ted Kremenek 4e56c42cac Add libEdit dependency on ClangDiagnosticCommon. Hopefully this will unbreak the VS build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160309 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 18:53:42 +00:00
Simon Atanasyan d7bad053b0 MIPS: Implement __builtin_mips_shll_qb builtin function overloading.
This function has two versions. The first one is used for a register operand.
The second one is used for an immediate number.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 18:52:02 +00:00
David Blaikie 85f485a70f Fix rejects-valid: explicit specialization of redeclared deleted function template.
Review by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160306 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 18:50:45 +00:00
Fariborz Jahanian daa872b64d modern objective-c translator: conditionally include
<string.h>. // rdar://11847319


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160287 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 16:21:45 +00:00
Aaron Ballman 177f1be7fe Fixing an MSVC warning -- the compiler did not like the cast added to work around a g++ bug (it would claim to possibly emit incorrect code).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 15:45:33 +00:00
Alexander Kornienko 6e39d05d4e Fixing an obvious bug in a test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160268 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 13:31:37 +00:00
Alexander Kornienko dea8fba3c6 The new clang-ast-dump tool for selective AST dumping. Moved common command-line tool stuff to CommandLineClangTool
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160265 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 12:46:48 +00:00
Daniel Jasper e994bb6b02 Add two more missing parameters in diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160264 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 12:12:45 +00:00
Daniel Jasper fef3f6f6e9 Fix diagnostic adding missing parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160263 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 11:51:49 +00:00
Daniel Jasper f85f60ae3a Prevent unused-variable warning in optimized builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160257 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 10:25:15 +00:00
Daniel Jasper fe7beeb421 Add refactoring callbacks to make common kinds of refactorings easy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160255 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 09:18:17 +00:00
Daniel Jasper a770a4daf7 Add correct parenthesis range to CXXConstructExprs inside
CXXFunctionalCastExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 08:05:07 +00:00
Ted Kremenek 32bb534cef Place checker build at alternate URL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 04:18:35 +00:00
Richard Smith aa488ea287 More for PR11848: a pack expansion type isn't necessarily type-dependent (its
pattern might be an alias template which doesn't use its arguments). It's always
instantiation-dependent, though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160246 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 01:59:26 +00:00
Richard Smith 7e54fb5fcc PR13365: Fix code which was trying to treat an array of DeducedTemplateArgument
as an array of its base class TemplateArgument. Switch the const
TemplateArgument* parameters of InstantiatingTemplate's constructors to
ArrayRef<TemplateArgument> to prevent this from happening again in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 01:09:10 +00:00
Richard Smith d8672ef2d3 Related to PR11848 and core-21989: switch ContainsUnexpandedParameterPack from
being a property of a canonical type to being a property of the fully-sugared
type. This should only make a difference in the case where an alias template
ignores one of its parameters, and that parameter is an unexpanded parameter
pack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 00:20:35 +00:00
Richard Smith 912394028d Revert change accidentally committed in r160240.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160241 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 23:30:50 +00:00
Richard Smith f5baeb4af5 PR13368: Halve the instantiation depth of this test again. Apparently, FreeBSD
has a much lower default stack limit than the systems I have access to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 23:29:50 +00:00
Chandler Carruth 6bebe5aca3 Update Clang to reflect the move of MDBuilder in r160237.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160238 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 23:28:01 +00:00
David Chisnall e091e95495 Add test case for tweaks to clang driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160236 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 21:18:01 +00:00
Daniel Jasper ff2fcb8db2 Fix spelling of anyOf matcher and add missing test.
Patch by Sam Panzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160233 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 19:57:12 +00:00
David Chisnall 7dae689d32 Enable new linker behaviour on FreeBSD.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 12:53:06 +00:00
Rafael Espindola d320ffc0f5 Without this patch clang warns on
struct __attribute__((visibility("hidden"))) zed {
};
struct __attribute__((visibility("hidden"))) zed;

Which is a bit silly and got a lot noisier now that we correctly handle
visibility pragmas. This patch fixes that and also has some extra quality
improvements:

* We now produce an error instead of a warning for

struct __attribute__((visibility("hidden"))) zed {
};
struct __attribute__((visibility("default"))) zed;

* The "after definition" warning now points to the new attribute that is
  ignored instead of pointing to the declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160227 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 01:33:40 +00:00
Rafael Espindola 4b044c6bc7 Make const the argument of getDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 01:05:36 +00:00
Eric Christopher 2b884a873a Use llvm::APSInt::isSameValue to compare for the same value.
Finishes rdar://11875995

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 00:24:00 +00:00
Eric Christopher 81695fa3a4 Replace IsSameValue with the llvm::APSInt/llvm::APInt versions
that we just copied from here and replace all uses.

Part of rdar://11875995

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 00:23:57 +00:00
Eric Christopher 71bcc68ba4 Capitalize comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160220 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 19:29:12 +00:00
Ted Kremenek 3f635c08b2 Refine CFG so that '&&' and '||' don't lead to extra confluence points when used in a branch, but
instead push the terminator for the branch down into the basic blocks of the subexpressions of '&&' and '||'
respectively.  This eliminates some artifical control-flow from the CFG and results in a more
compact CFG.

Note that this patch only alters the branches 'while', 'if' and 'for'.  This was complex enough for
one patch.  The remaining branches (e.g., do...while) can be handled in a separate patch, but they
weren't immediately tackled because they were less important.

It is possible that this patch introduces some subtle bugs, particularly w.r.t. to destructor placement.
I've tried to audit these changes, but it is also known that the destructor logic needs some refinement
in the area of '||' and '&&' regardless (i.e., their are known bugs).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 05:04:10 +00:00
Ted Kremenek 5c3ea5c579 Hoist CFG builder logic for '&&' and '||' into helper method. No funcationlity change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160217 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 05:04:06 +00:00
Ted Kremenek 449d4d5a33 Remove unused method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160216 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 05:04:04 +00:00
Ted Kremenek 6960ee6c7c Sort prototypes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160215 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 05:04:01 +00:00
Richard Trieu 08c39d88ff Update Sema diagnostic messages to take advantage of template type diffing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160210 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-14 00:49:02 +00:00
Chad Rosier f9e9af7df0 Add a per target max vector alignment field (e.g., 32-byte alignment for x86 due to
AVX).  Currently, if no aligned attribute is specified the alignment of a vector is
inferred from its size.  Thus, very large vectors will be over-aligned with no 
benefit.  Target owners should set this target max.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160209 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 23:57:43 +00:00
Richard Smith 558e8872b3 PR13360: When deciding the earliest point which inevitably leads to an
uninitialized variable use, walk back over branches where we've reached all the
non-null successors, not just cases where we've reached all successors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 23:33:44 +00:00
Rafael Espindola 0bab9da90f Move option test earlier in the function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160202 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 23:26:43 +00:00
Joel Jones 87d747b1fb This is one of the first steps at moving to replace target-dependent
intrinsics with target-indepdent intrinsics.  The first instruction(s) to be 
handled are the vector versions of count leading zeros (ctlz).

The changes here are to clang so that it generates a target independent 
vector ctlz when it sees an ARM dependent vector ctlz.  The changes in llvm 
are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp 
to update any existing bc files containing ARM dependent vector ctlzs with 
target-independent ctlzs.  There are also changes to an existing test case in 
llvm for ARM vector count instructions and a new test for the bitcode upgrade.

<rdar://problem/11831778>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160201 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 23:26:27 +00:00
Dmitri Gribenko d64e2ee48a Comment.h: reword comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160197 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 22:36:49 +00:00
Richard Trieu 5561977175 Modify tree printing mode for template type diffing. If a diagnostic has
multiple %diff's, only print the first tree and fallback to inline printing
for the rest of the diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160193 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 21:18:32 +00:00
Nuno Lopes f195f2cacf add support for conditional expressions in Expr::HasSideEffects()
This fixes a bug in __builtin_object_size() codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160191 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 20:48:52 +00:00
Tanya Lattner 916ea6522a Move a bunch of the attribute warnings under the IgnoreAttributes group. Cleaned up test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160190 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 20:45:35 +00:00
Dmitri Gribenko 0eaf69d9a1 Comment AST nodes: rename getXXXCount() methods to getNumXXXs() to be in line with Statement AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160182 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 19:02:42 +00:00
Rafael Espindola 6b60370ddb Apply visibility pragmas to class template declarations. This is needed because
we might use the declaration to build a type before seeing the definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160176 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 18:04:45 +00:00
Rafael Espindola b04b731220 Use -fvisibility-inlines-hidden in inline functions too. This matches gcc
behavior since gcc pr30066. Thanks to Benjamin Kramer for pointing it out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 14:25:36 +00:00