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

36244 Коммитов

Автор SHA1 Сообщение Дата
Chad Rosier 61ada0a7a8 In r135308, -save-temps was modified to prevent a temporary file from
overwriting the input file.  For example,

clang -c foo.s -o foo.o -save-temps

Unfortunately, the original patch didn't compare the paths of the input and
output files.  Thus, something like the following would fail to create foo.s.

cd /tmp/obj
clang -c ../src/foo.s -o foo.o -save-temps

rdar://11252615


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 20:05:08 +00:00
Richard Smith 704c8f76bb Fix bug where a class's (deleted) copy constructor would be implicitly given a
non-const reference parameter type if the class had any subobjects with deleted
copy constructors. This causes a rejects-valid if the class's copy constructor
is explicitly defaulted (as happens for some implementations of std::pair etc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 18:46:14 +00:00
Benjamin Kramer 3a0b7b6ac7 c++11 status: Replace references to "SVN" with "3.1" to avoid confusion when they diverge.
Color is still yellow, as 3.1 isn't released yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155217 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 18:43:50 +00:00
Chad Rosier d2fb883009 When generating the clang crash diagnostic script, strip out the -o flag.
Add a FIXME comment.
rdar://11283560


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155207 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 17:21:42 +00:00
Chad Rosier 80ec127fc9 Add a little hack to emulate a clang crash, so the diagnostics generator can be
tested.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155205 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 17:08:59 +00:00
Fariborz Jahanian 89592d5046 minor improvement to couple of tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155204 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 17:07:07 +00:00
Manuel Klimek dab28942c4 No need to put the SourceManager in with the ASTContext, as the ASTContext
already contains the SourceManager.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155198 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 14:07:01 +00:00
Evgeniy Stepanov 700c508fd4 Pass -mfloat-abi= to linuxtools assembler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155191 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 09:03:40 +00:00
Timur Iskhodzhanov 8560791791 Fix bug 12574 - Avoid infinite recursion in constructors and destructors when using Microsoft C++ ABI
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155189 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 08:05:00 +00:00
Richard Smith c93e014cd4 Replace r155185 with a better fix, which also addresses PR12557. When looking
up an elaborated type specifier in a friend declaration, only look for type
declarations, per [basic.lookup.elab]p2. If we know that the redeclaration
lookup for a friend class template in a dependent context finds a non-template,
don't delay the diagnostic to instantiation time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155187 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 07:12:26 +00:00
Richard Smith b2f245e77d Fix a bug which creduce found reducing PR12585.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155185 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 05:42:36 +00:00
Chad Rosier cc66b08945 When generating the clang crash diagnostic script, strip out the -D, -F, and -I
flags.  We have preprocessed source, so we don't need these.

No test case as it's fairly difficult to make the compiler crash on demand.  I'll
patiently wait for Ben to tell me how to do this in 2 lines of code.  :)
rdar://11283560


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155180 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20 00:30:04 +00:00
Fariborz Jahanian 9879556f25 objective-arc: Retune my previous patch so warning
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155169 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 23:49:39 +00:00
Kaelyn Uhrain 1e77b65b48 Re-add the closing '}' for the namespace I accidentally deleted when
removing a (new) duplicate test whose only difference was the tag type
being an enum instead of a struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155165 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 23:26:12 +00:00
Kaelyn Uhrain 434ed260eb In Parser::isCXXDeclarationSpecifier, consider a non-type identifier
followed by an identifier as declaration specificer (except for ObjC).
This allows e.g. an out-of-line C++ member function definitions to be
recognized as functions and not as variable declarations if the type
name for the first parameter is not recognized as a type--say, when there
is a function name shadowing an enum type name and the parameter is
missing the "enum" keyword needed to distinguish the two.

Note that returning TPResult::Error() instead of TPResult::True()
appears to have the same end result, while TPResult::Ambiguous()
results in a crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155163 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 23:17:45 +00:00
Richard Smith 0c5d0a8052 In an attempt to reduce confusion, mark 'Strong compare exchange' as done, since
we generate correct code for both strong and weak atomic compare-exchanges, even
though we don't propagate to the IR enough information to generate optimal weak
compare-exchanges on architectures which support them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155161 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 22:09:22 +00:00
Fariborz Jahanian 289677da2d objective-c arc: Issue warning under -Wreceiver-is-weak
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155159 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 21:44:57 +00:00
Patrick Beard 16c111ba80 Added equivalent method calls in examples.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155155 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 20:48:09 +00:00
Richard Smith c495e60747 Formatting fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 17:46:52 +00:00
David Blaikie 789acdd196 Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155140 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 17:26:49 +00:00
David Blaikie a9639620e0 Fix a broken link. Patch by Nikola Smiljanic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155139 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 17:21:46 +00:00
DeLesley Hutchins 54c350a67b Refactor the thread safety analysis so that it is easier to do
path-sensitive analysis like handling of trylock expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155137 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 16:48:43 +00:00
Fariborz Jahanian b5863da6ef objective-c modern translator: Further improving the last
patch fixing writing a spurious 'static' into
the wrong place. // rdar://11275241


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155130 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 16:30:28 +00:00
DeLesley Hutchins ae519c42a1 Thread safety analysis: split warnings into two groups: attribute warnings
which are checked in the parser, and analysis warnings that require the
full analysis.  This allows attribute syntax to be checked independently
of the full thread safety analysis.  Also introduces a new warning for the
case where a string is used as a lock expression; this allows the analysis
to gracefully handle expressions that would otherwise cause a parse error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155129 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 16:10:44 +00:00
Patrick Beard dd9fe59a9a Clarified encoding of boxed C strings, balanced all <p> with </p>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155126 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 14:33:55 +00:00
Manuel Klimek fad7f85553 Adds a unit test for the RecursiveASTVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 08:48:53 +00:00
Francois Pichet b4143472c7 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155107 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 07:48:57 +00:00
Richard Smith 03544fccd1 Add missing -Wc++98-compat warnings for initializer list initializations which
initialize references, create std::initializer_list objects, or call constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 06:58:00 +00:00
Rafael Espindola c7e606086a In mergeVisibility, if we already have an explicit visibility, keep it.
This fixes the included testcase and lets us simplify the code a bit. It
does require using mergeWithMin when merging class information to its
members. Expand the comments to explain why that works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155103 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 05:50:08 +00:00
Rafael Espindola 1c7eed7e6e In mergeVisibilityWithMin, let an implicit hidden symbol take precedence over
an explicit default one. This means that with -fvisibility hidden we
now produce a hidden symbol for

template <typename T>
class DEFAULT foo {
  void bar() {}
};
class zed {};
template class foo<zed>;

This matches the behaviour of gcc 4.7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 05:34:51 +00:00
Rafael Espindola d70d20a361 Now that we check visibility attributes in an appropriate order,
there is no need for mergeVisibily to ever increase the visibility. Not
doing so lets us replace an incorrect use of mergeVisibilityWithMin. The
testcase

struct HIDDEN RECT {
  int top;
};
DEFAULT RECT foo = {0};

shows that we should give preference to one of the attributes instead of
keeping the minimum. We still get this testcase wrong because mergeVisibily
handles two explicit visibilities incorrectly, but this is a step in the
right direction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155101 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 05:24:05 +00:00
Rafael Espindola 4fc1490572 Check ConsiderGlobalVisibility before using -fvisibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155100 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 04:37:16 +00:00
Rafael Espindola 415745474c The explicit bit in LV already tracks exactly the same information as
DHasExplicitVisibility. Simplify the code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155099 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 04:27:47 +00:00
Rafael Espindola ff2579816b Move the point in the code where we handle -fvisibility=hidden. With
the current implementation this should be a nop as explicit visibility
takes precedence in mergeVisibility.

The location chosen is such that attributes checked above it can force
a symbol to be default. For example, an attribute is the variable or function.
Attributes checked after this point, can only make the visibility more
restrictive. An attribute in a type for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155098 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 02:55:01 +00:00
Rafael Espindola 5727cf50bf Make setVisibility private and change users to mergeVisibility. This is
currently a nop as those users are the first merge or are a merge
of a hidden explicit visibility, which always wins in the current
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 02:22:07 +00:00
Patrick Beard ab8f4da25d Changed title.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155088 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 01:30:47 +00:00
Patrick Beard f7736eae85 Changed wording of availability.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155086 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 01:02:16 +00:00
Fariborz Jahanian b75f8de7dd modern objective-c translator: Fix writing a spurious 'static'
into the wrong place when rewriting a static function
which declares block literals. // rdar://11275241


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:50:01 +00:00
Patrick Beard eb382ec150 Implements boxed expressions for Objective-C. <rdar://problem/10194391>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:25:12 +00:00
Richard Smith 13bffc532b PR 12586: Fix assert while running libc++ testsuite: deal with exception
specifications on member function templates of class templates and other such
nested beasties. Store the function template from which we are to instantiate
an exception specification rather than trying to deduce it. Plus some
additional test cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155076 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:08:28 +00:00
Chandler Carruth 103f41d0e7 Revert some Hexagon builtin commits to match reverts done to LLVM in
r155047. See the LLVM log for the primary motivation:
  http://llvm.org/viewvc/llvm-project?rev=155047&view=rev

Primary commit r154828:
  - Several issues were raised in review, and fixed in subsequent
    commits.
  - Follow-up commits also reverted, and which should be folded into the
    original before reposting:
    - r154837: Re-add the 'undef BUILTIN' thing to fix the build.
    - r154928: Fix build warnings, re-add (and correct) header and
      license
    - r154937: Typo fix.

Please resubmit this patch with the relevant LLVM resubmission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 21:32:25 +00:00
Fariborz Jahanian a2c91e75c9 objective-c: Issue diagnostic when an implicit
property accessor (getter) missing, instead of crashing.
// rdar://11273060


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 19:13:23 +00:00
Matt Beaumont-Gay 0ddb097bb0 Suppress -Wunused-variable warning in -Asserts build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 17:25:16 +00:00
Benjamin Kramer d448ce0932 VerifyICE: Pass PartialDiagnostics by reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 14:22:41 +00:00
Simon Atanasyan 8b2a5d2ac0 MIPS: Followup to r154606. Expand list of accepted MIPS target features in the MipsTargetInfoBase::setFeatureEnabled() routine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 12:00:11 +00:00
Gabor Greif 241cbe488c fix GCC version comparison wrt. equal patch suffices (and squash two typos)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154997 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 10:59:08 +00:00
Manuel Klimek 30318e6df9 Adds a FixedCompilationDatabase to be able to specify tool parameters
at the command line.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 07:41:50 +00:00
Ted Kremenek 6403683411 Fix bad typo reported by I-Jui Sung.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 05:37:13 +00:00
Francois Pichet 2d01f2c414 As per John McCall comment:
Follow up to r154924: check that we are in a static CMethodDecl to enable the Microsoft bug emulation regarding access to protected member during PTM creation. Not just any static function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154982 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 03:24:38 +00:00
Seth Cantrell 3acf764931 fix display of source lines with null characters
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154981 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-18 02:44:48 +00:00