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

36339 Коммитов

Автор SHA1 Сообщение Дата
Manuel Klimek d9ed0fd0d1 Adds a small tutorial on how to write RAV based ASTFrontendActions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155627 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 08:35:39 +00:00
Craig Topper fd93630cce Enable AVX/AVX2 for Sandy Bridge, Ivy Bridge, and Haswell CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155624 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 07:31:30 +00:00
Ted Kremenek cfca6b7b79 Update checker build link, and remove stale links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155622 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 07:29:14 +00:00
Richard Smith a43ea64602 PR12647: An alias template instantiation which occurs in a SFINAE context is
itself a SFINAE context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155621 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 07:24:08 +00:00
Ted Kremenek 8f40afbf77 [analyzer] check lazy bindings in RegionStore first before looking for default values. Fixes <rdar://problem/11269741>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155615 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 05:08:26 +00:00
Ted Kremenek befc6d2eae Teach RetainCountChecker that it doesn't quite understand pthread_setspecific and it should just give up when it sees it. Fixes <rdar://problem/11282706>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 04:32:23 +00:00
Richard Smith 6e4a0af697 PR12660: Don't crash when initializing a const reference from a braced init list
which creates a temporary by calling a constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155608 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 03:16:45 +00:00
Chandler Carruth 4f50c50e78 Fix a long-standing bug where Clang had a different default from GCC on
Linux and other (non-Darwin) platforms and have it use -fmath-errno by
default (for better or worse).

Darwin has seen the light here and uses -fno-math-errno by default, this
patch preserves that.

If any maintainers for a non-Linux platform would also like to opt-in to
-fno-math-errno by default, I'm happy to add folks, but we're currently
getting buts and misleading comparisons with GCC due to this difference
in behavior on Linux at least.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155607 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 02:10:51 +00:00
Richard Smith 86e6fdcf1a Two missing -Wc++98-compat warnings, for null pointers as non-type template
arguments, and 'this' in exception-specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155606 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 01:51:03 +00:00
Rafael Espindola 45a0b26451 Reject cases like
struct __attribute__((visibility("hidden"))) a;
struct __attribute__((visibility("default"))) b;

which gcc already rejects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155603 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 01:26:03 +00:00
Richard Smith c799a6a5c8 If a type is non-literal by virtue of being incomplete produce notes
explaining that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155598 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 23:23:48 +00:00
Richard Smith a313b2fbba RecursiveASTVisitor: When in 'shouldVisitTemplateInstantiations' mode, visit
all instantiations of a template when we visit the canonical declaration of the
primary template, rather than trying to match them up to the partial
specialization from which they are instantiated. This fixes a bug where we
failed to visit instantiations of partial specializations of member templates of
class templates, and naturally extends to allow us to visit instantiations where
we have instantiated only a declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155597 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 22:57:25 +00:00
Chad Rosier 26d6023cb0 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155596 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 22:51:41 +00:00
Fariborz Jahanian df407c337c objective-c modern translator: more tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155585 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 20:48:00 +00:00
Kaelyn Uhrain 2b90f7637e Add an error message with fixit hint for changing '.' to '->'.
This is mainly for attempting to recover in cases where a class provides
a custom operator-> and a '.' was accidentally used instead of '->' when
accessing a member of the object returned by the current object's
operator->.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155580 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 19:49:54 +00:00
Argyrios Kyrtzidis ad579916bc When resolving default template arguments, it should be done in the declaration context
of the template what we are going to instantiate.

Fixes various crashes of rdar://11242625 & http://llvm.org/PR11421.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155576 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:39:17 +00:00
Richard Smith 5d59b79c2f PR12625: Cope with classes which have incomplete base or member types:
Don't try to query whether an incomplete type has a trivial copy constructor
when determining whether a move constructor should be declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155575 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:28:49 +00:00
Benjamin Kramer 0d62709c6e Use a SmallMap for StoredDeclsMap, it's usually sparsely populated so we can avoid initializing memory for 64 buckets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:21:27 +00:00
Benjamin Kramer 383fdf9b83 Convert a std::map that usually has between 0 and 10 elements to SmallMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155570 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:21:21 +00:00
Fariborz Jahanian d3a39f0a42 improve a modern objc translator test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155569 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 18:11:57 +00:00
Fariborz Jahanian 041895354a modern objc rewriter: fixes a bug writing
a const qualified static c-function. 
// rdar://11314329


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155564 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 17:56:48 +00:00
Manuel Klimek d80d484168 Adds documentation for how to use the tooling library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 14:20:13 +00:00
Manuel Klimek 9771a9e572 Adds a document describing the various tooling approaches and their pros and
cons.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155549 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 13:57:00 +00:00
Evgeniy Stepanov 99f8f17c2a Make asan-ld test windows-safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 09:28:10 +00:00
Manuel Klimek 3e8479d97f Fixes the header search logic for tools:
The driver needs to get the correct path to the executable to deduce
the header search path.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 09:25:41 +00:00
Evgeniy Stepanov a6ddc02921 Clang driver support for linking on Android.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155541 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 08:59:22 +00:00
Evgeniy Stepanov 4add84f83f Fix default cpu for -march=armv5e.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 08:35:56 +00:00
Chris Lattner 4ddcf3b08d OpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and replace
with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h.

Patch by Brad Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 06:12:24 +00:00
Chris Lattner 92f4e6e8f9 don't use soname on OpenBSD, it doesn't support it. Patch by
Brad Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 06:09:30 +00:00
Nico Weber 3030066ef0 Expand #include_next in float.h from mingw to _msc_ver.
A test for this is checking if this compiles:

    #include <float.h>

    inline bool IsFinite(const double& number) {
     return _finite(number) != 0;
    }

That depends however on either mingw or msvc being installed, and
chapuni tells me there might be issues with float.h on mingw, so
no automated test is added.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155507 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 23:43:40 +00:00
Chad Rosier e7255c1b2c Add acos, asin, ceil, fabs, floor, fmax, fmin, round, and tan to the builtin
math library functions.
rdar://11251464


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 23:06:26 +00:00
Chad Rosier 454393e3e6 Add atan, atan2, exp, and log to the builtin math library functions.
With -fno-math-errno (the default for Darwin) or -ffast-math these library 
function can be marked readnone enabling more opportunities for CSE and other
optimizations.
rdar://11251464


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 22:40:01 +00:00
Chad Rosier fae0f48cde Alphabetize the builtin math library functions. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 21:45:50 +00:00
Nico Weber 08e46f97ec Let NULL and MSVC headers coexist better.
Fixes the two issues mentioned in PR12146.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155490 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 21:27:01 +00:00
Richard Smith 5482dc3a88 RecursiveASTVisitor: Visit instantiations of member templates of class
templates. In an implicit instantiation of a member class, any member
templates don't get instantiated, so the existing check which only visited
the instantiations of a defined template skipped these templates'
instantiations.

Since there is only a single declaration of a member template of a class
template specialization, just use that to determine whether to visit the
instantiations. This introduces a slight inconsistency in that we will
visit the instantiations of such templates whether or not they are
defined, but we never visit a declared-but-not-defined instantiation, so
this turns out to not matter.

Patch by Daniel Jasper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 20:39:49 +00:00
Fariborz Jahanian 4fe261cb0a modern objc translator: Allow writing of multiple
declaration of __block variables on same lines
with initializers. // rdsr://7547630


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 19:38:45 +00:00
Fariborz Jahanian e6e96de44f objc modern rewriter: allow translation of
multiple declaration of block variables
(with no initializer) on the same line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 18:16:20 +00:00
Fariborz Jahanian 8247c4ed71 objc modern rewriter: minor refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155449 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 16:45:27 +00:00
Gabor Greif e47398abd3 Add a FIXME for uncomplete comment
fix a typo
add punctuation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 15:42:03 +00:00
Aaron Ballman e70372d822 Adding information about what intrinsics still need to be implemented for MSVC compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155441 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 12:30:37 +00:00
Bill Wendling 0982251be9 Add a flag to the image info section indicating that the program is compiled for
a simulator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155436 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 11:04:57 +00:00
Evgeniy Stepanov eca187e9f2 Only pass -mcpu, -march, -mfpu to linux-as on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 09:05:31 +00:00
Kostya Serebryany c9fe6056e4 enable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155430 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 06:57:01 +00:00
Chandler Carruth 8ac95f19e6 Fix a typo spotted by Matt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155427 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:59:48 +00:00
Richard Smith 2b2a0876c9 Don't try to delay parsing the exception specification for a data member of a
class; we would never actually parse it and attach it to the type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155426 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:48:42 +00:00
Chandler Carruth 5775351564 Introduce an initial sketch of a MSVC compatible 'intrin.h' builtin
header, along with a stub test to make sure it compiles in the
appropriate modes.

Thanks to Aaron Ballman for working with me to figure out the initial
strategy here, and to Nico for reviewing and pestering me to actually
commit it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:23:54 +00:00
Richard Smith 8c614e4f2b PR12629: Cope with parenthesized function types when attaching a delayed
exception specification to a function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:06:35 +00:00
NAKAMURA Takumi 88442c935d clang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predefined __declspec similar to r155278.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 01:19:04 +00:00
DeLesley Hutchins 64b111e81d Thread safety analysis: refactor test cases so that the style is
consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 20:41:57 +00:00
Fariborz Jahanian d672436751 with -Wdeprecated, include a note to its deprecated declaration
location. // rdar://10893232


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 20:30:52 +00:00