]> granicus.if.org Git - clang/log
clang
12 years agoAdds documentation for how to use the tooling library.
Manuel Klimek [Wed, 25 Apr 2012 14:20:13 +0000 (14:20 +0000)]
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

12 years agoAdds a document describing the various tooling approaches and their pros and
Manuel Klimek [Wed, 25 Apr 2012 13:57:00 +0000 (13:57 +0000)]
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

12 years agoMake asan-ld test windows-safe.
Evgeniy Stepanov [Wed, 25 Apr 2012 09:28:10 +0000 (09:28 +0000)]
Make asan-ld test windows-safe.

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

12 years agoFixes the header search logic for tools:
Manuel Klimek [Wed, 25 Apr 2012 09:25:41 +0000 (09:25 +0000)]
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

12 years agoClang driver support for linking on Android.
Evgeniy Stepanov [Wed, 25 Apr 2012 08:59:22 +0000 (08:59 +0000)]
Clang driver support for linking on Android.

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

12 years agoFix default cpu for -march=armv5e.
Evgeniy Stepanov [Wed, 25 Apr 2012 08:35:56 +0000 (08:35 +0000)]
Fix default cpu for -march=armv5e.

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

12 years agoOpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and replace
Chris Lattner [Wed, 25 Apr 2012 06:12:24 +0000 (06:12 +0000)]
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

12 years agodon't use soname on OpenBSD, it doesn't support it. Patch by
Chris Lattner [Wed, 25 Apr 2012 06:09:30 +0000 (06:09 +0000)]
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

12 years agoExpand #include_next in float.h from mingw to _msc_ver.
Nico Weber [Tue, 24 Apr 2012 23:43:40 +0000 (23:43 +0000)]
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

12 years agoAdd acos, asin, ceil, fabs, floor, fmax, fmin, round, and tan to the builtin
Chad Rosier [Tue, 24 Apr 2012 23:06:26 +0000 (23:06 +0000)]
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

12 years agoAdd atan, atan2, exp, and log to the builtin math library functions.
Chad Rosier [Tue, 24 Apr 2012 22:40:01 +0000 (22:40 +0000)]
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

12 years agoAlphabetize the builtin math library functions. No functional change intended.
Chad Rosier [Tue, 24 Apr 2012 21:45:50 +0000 (21:45 +0000)]
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

12 years agoLet NULL and MSVC headers coexist better.
Nico Weber [Tue, 24 Apr 2012 21:27:01 +0000 (21:27 +0000)]
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

12 years agoRecursiveASTVisitor: Visit instantiations of member templates of class
Richard Smith [Tue, 24 Apr 2012 20:39:49 +0000 (20:39 +0000)]
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

12 years agomodern objc translator: Allow writing of multiple
Fariborz Jahanian [Tue, 24 Apr 2012 19:38:45 +0000 (19:38 +0000)]
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

12 years agoobjc modern rewriter: allow translation of
Fariborz Jahanian [Tue, 24 Apr 2012 18:16:20 +0000 (18:16 +0000)]
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

12 years agoobjc modern rewriter: minor refactoring.
Fariborz Jahanian [Tue, 24 Apr 2012 16:45:27 +0000 (16:45 +0000)]
objc modern rewriter: minor refactoring.

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

12 years agoAdd a FIXME for uncomplete comment
Gabor Greif [Tue, 24 Apr 2012 15:42:03 +0000 (15:42 +0000)]
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

12 years agoAdding information about what intrinsics still need to be implemented for MSVC compat...
Aaron Ballman [Tue, 24 Apr 2012 12:30:37 +0000 (12:30 +0000)]
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

12 years agoAdd a flag to the image info section indicating that the program is compiled for
Bill Wendling [Tue, 24 Apr 2012 11:04:57 +0000 (11:04 +0000)]
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

12 years agoOnly pass -mcpu, -march, -mfpu to linux-as on ARM.
Evgeniy Stepanov [Tue, 24 Apr 2012 09:05:31 +0000 (09:05 +0000)]
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

12 years agoenable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing
Kostya Serebryany [Tue, 24 Apr 2012 06:57:01 +0000 (06:57 +0000)]
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

12 years agoFix a typo spotted by Matt.
Chandler Carruth [Tue, 24 Apr 2012 05:59:48 +0000 (05:59 +0000)]
Fix a typo spotted by Matt.

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

12 years agoDon't try to delay parsing the exception specification for a data member of a
Richard Smith [Tue, 24 Apr 2012 05:48:42 +0000 (05:48 +0000)]
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

12 years agoIntroduce an initial sketch of a MSVC compatible 'intrin.h' builtin
Chandler Carruth [Tue, 24 Apr 2012 05:23:54 +0000 (05:23 +0000)]
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

12 years agoPR12629: Cope with parenthesized function types when attaching a delayed
Richard Smith [Tue, 24 Apr 2012 05:06:35 +0000 (05:06 +0000)]
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

12 years agoclang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predef...
NAKAMURA Takumi [Tue, 24 Apr 2012 01:19:04 +0000 (01:19 +0000)]
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

12 years agoThread safety analysis: refactor test cases so that the style is
DeLesley Hutchins [Mon, 23 Apr 2012 20:41:57 +0000 (20:41 +0000)]
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

12 years agowith -Wdeprecated, include a note to its deprecated declaration
Fariborz Jahanian [Mon, 23 Apr 2012 20:30:52 +0000 (20:30 +0000)]
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

12 years agoForward declarations should take a context. This helps the debugger
Eric Christopher [Mon, 23 Apr 2012 19:00:24 +0000 (19:00 +0000)]
Forward declarations should take a context. This helps the debugger
find forward declarations in the context that the actual definition
will occur.

rdar://11291658

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

12 years agoThread safety analysis: support the use of pt_guarded_by attributes
DeLesley Hutchins [Mon, 23 Apr 2012 18:39:55 +0000 (18:39 +0000)]
Thread safety analysis:  support the use of pt_guarded_by attributes
on smart pointers.  Also adds test case for previous commit.

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

12 years agoRevert r155363, due to the underlying patches in LLVM causing regression
Chandler Carruth [Mon, 23 Apr 2012 18:25:40 +0000 (18:25 +0000)]
Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

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

12 years agoFix visibility when we have two types with explicit visibility in a template
Rafael Espindola [Mon, 23 Apr 2012 17:51:55 +0000 (17:51 +0000)]
Fix visibility when we have two types with explicit visibility in a template
argument list.

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

12 years agoHexagon V5 (floating point) support in cfe.
Sirish Pande [Mon, 23 Apr 2012 17:48:57 +0000 (17:48 +0000)]
Hexagon V5 (floating point) support in cfe.

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

12 years agoThread-safety analysis: support new "pointer to member" syntax for
DeLesley Hutchins [Mon, 23 Apr 2012 16:45:01 +0000 (16:45 +0000)]
Thread-safety analysis: support new "pointer to member" syntax for
existentially quantified lock expressions.

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

12 years agoTeach RequireCompleteType about multi-dimensional arrays. Fixes
Douglas Gregor [Mon, 23 Apr 2012 16:42:52 +0000 (16:42 +0000)]
Teach RequireCompleteType about multi-dimensional arrays. Fixes
<rdar://problem/11284902>.

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

12 years agoFix PR12608. Patch contributed by Yang Chen.
Manuel Klimek [Mon, 23 Apr 2012 16:40:40 +0000 (16:40 +0000)]
Fix PR12608. Patch contributed by Yang Chen.

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

12 years agoAdd a test for svn r155263.
Bob Wilson [Mon, 23 Apr 2012 16:22:22 +0000 (16:22 +0000)]
Add a test for svn r155263.

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

12 years agoInline helper function into only caller.
Rafael Espindola [Mon, 23 Apr 2012 14:27:47 +0000 (14:27 +0000)]
Inline helper function into only caller.

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

12 years agoAdd another testcase that was not being covered.
Rafael Espindola [Mon, 23 Apr 2012 14:02:53 +0000 (14:02 +0000)]
Add another testcase that was not being covered.

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

12 years ago[asan] fix typo
Kostya Serebryany [Mon, 23 Apr 2012 10:15:18 +0000 (10:15 +0000)]
[asan] fix typo

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

12 years ago[asan] update docs
Kostya Serebryany [Mon, 23 Apr 2012 09:05:50 +0000 (09:05 +0000)]
[asan] update docs

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

12 years agoDo not use stdint.h, driver might provide invalid location for it. Instead, provide...
Anton Korobeynikov [Mon, 23 Apr 2012 09:02:13 +0000 (09:02 +0000)]
Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly.
This should fix PR12628

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

12 years agoFixes comment referencing old name.
Manuel Klimek [Mon, 23 Apr 2012 08:43:08 +0000 (08:43 +0000)]
Fixes comment referencing old name.

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

12 years agoAdd a testcase that we already get right but was not being tested. Found
Rafael Espindola [Sun, 22 Apr 2012 22:31:25 +0000 (22:31 +0000)]
Add a testcase that we already get right but was not being tested. Found
by a chrome build on OS X. Thanks to Nico Weber for testing a patch and
providing the .ii file.

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

12 years agoSema: Initialize NSString method cache members.
Benjamin Kramer [Sun, 22 Apr 2012 20:43:35 +0000 (20:43 +0000)]
Sema: Initialize NSString method cache members.

Found by valgrind.

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

12 years agoRemove unnecessary StringRef->char*->StringRef conversion, which read uninitialized...
Benjamin Kramer [Sun, 22 Apr 2012 20:43:30 +0000 (20:43 +0000)]
Remove unnecessary StringRef->char*->StringRef conversion, which read uninitialized memory if the input wasn't 0-terminated.

Found by valgrind.

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

12 years agoCleanup testcase.
Rafael Espindola [Sun, 22 Apr 2012 16:03:00 +0000 (16:03 +0000)]
Cleanup testcase.

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

12 years agoAn attribute in a explicit template installation should take precedence over
Rafael Espindola [Sun, 22 Apr 2012 15:31:59 +0000 (15:31 +0000)]
An attribute in a explicit template installation should take precedence over
the tempale arguments in deciding the visibility.

This agrees with gcc 4.7.

Found by trying to build chrome with component=shared_library with 155314
reverted.

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

12 years agoRevert 155102 but add a fixme while I debug what is wrong with chrome's
Rafael Espindola [Sun, 22 Apr 2012 12:37:27 +0000 (12:37 +0000)]
Revert 155102 but add a fixme while I debug what is wrong with chrome's
components build.

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

12 years agoBetter C++11 support is no longer an advantage of GCC.
Benjamin Kramer [Sun, 22 Apr 2012 11:34:43 +0000 (11:34 +0000)]
Better C++11 support is no longer an advantage of GCC.

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

12 years agoPR12571: Objects of type clang::ConstantArrayType aren't always emitted with
Richard Smith [Sun, 22 Apr 2012 05:51:36 +0000 (05:51 +0000)]
PR12571: Objects of type clang::ConstantArrayType aren't always emitted with
type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert
if such a global array has an element type with a non-trivial destructor.

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

12 years agoAdd another missing testcase.
Rafael Espindola [Sun, 22 Apr 2012 02:41:22 +0000 (02:41 +0000)]
Add another missing testcase.

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

12 years agoPR12585: When processing a friend template inside a class template, don't
Richard Smith [Sun, 22 Apr 2012 02:13:50 +0000 (02:13 +0000)]
PR12585: When processing a friend template inside a class template, don't
pretend there was no previous declaration -- that can lead us to injecting
a class template (with no access specifier) into a class scope. Instead,
just avoid the problematic checks.

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

12 years agoAdd a testcase we were already getting right, but were not testing for.
Rafael Espindola [Sun, 22 Apr 2012 01:22:25 +0000 (01:22 +0000)]
Add a testcase we were already getting right, but were not testing for.

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

12 years agoFix handling of template parameters. Found by inspection. GCC 4.7 agrees
Rafael Espindola [Sun, 22 Apr 2012 00:43:48 +0000 (00:43 +0000)]
Fix handling of template parameters. Found by inspection. GCC 4.7 agrees
with this testcase.

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

12 years agoAll the members of LVFlags always have the same value, replace the class with
Rafael Espindola [Sat, 21 Apr 2012 23:28:21 +0000 (23:28 +0000)]
All the members of LVFlags always have the same value, replace the class with
a boolean.

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

12 years agoFix regression in r154844. If necessary, defer computing adjusted destructor
Richard Smith [Sat, 21 Apr 2012 18:42:51 +0000 (18:42 +0000)]
Fix regression in r154844. If necessary, defer computing adjusted destructor
exception specifications in C++11 until after we've parsed the exception
specifications for nested classes.

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

12 years agoRemove unneeded code.
Fariborz Jahanian [Sat, 21 Apr 2012 17:51:44 +0000 (17:51 +0000)]
Remove unneeded code.

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

12 years agoFix serialization of uninstantiated exception specifications. Patch by Li Kan,
Richard Smith [Sat, 21 Apr 2012 17:47:47 +0000 (17:47 +0000)]
Fix serialization of uninstantiated exception specifications. Patch by Li Kan,
test by me.

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

12 years agomove some stuff to .rodata
Nuno Lopes [Sat, 21 Apr 2012 14:45:25 +0000 (14:45 +0000)]
move some stuff to .rodata

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

12 years agoSemaDeclCXX.cpp: Fix utf8 in comment.
NAKAMURA Takumi [Sat, 21 Apr 2012 09:40:04 +0000 (09:40 +0000)]
SemaDeclCXX.cpp: Fix utf8 in comment.

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

12 years agoclang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Mark as XFAIL:mingw for...
NAKAMURA Takumi [Sat, 21 Apr 2012 09:39:58 +0000 (09:39 +0000)]
clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Mark as XFAIL:mingw for now, due to predefined __declspec.

It could be tweaked to add -triple i686-win32, though.

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

12 years agoAlso highlight the member name.
Matt Beaumont-Gay [Sat, 21 Apr 2012 02:13:04 +0000 (02:13 +0000)]
Also highlight the member name.

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

12 years agoFix test failure.
Richard Smith [Sat, 21 Apr 2012 01:51:32 +0000 (01:51 +0000)]
Fix test failure.

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

12 years agoWhen declaring a template, check that the context doesn't already contain a
Richard Smith [Sat, 21 Apr 2012 01:27:54 +0000 (01:27 +0000)]
When declaring a template, check that the context doesn't already contain a
declaration of the same name. r155187 caused us to miss this if the prior
declaration did not declare a type.

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

12 years agoFix a QoI bug reported by a user.
Matt Beaumont-Gay [Sat, 21 Apr 2012 01:12:48 +0000 (01:12 +0000)]
Fix a QoI bug reported by a user.

Set the source location for the "member reference base type ... is not a
structure or union" diag to point at the operator rather than the member name.
If we're giving this diagnostic because of a typo'd '.' in place of a ';' at
the end of a line, the caret previously pointed at the identifier on the
following line, which isn't as helpful as it could be. Pointing the caret at
the '.' makes it more obvious what the problem is.

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

12 years agoLink with Foundation whenever -fobjc-link-runtime is used. <rdar://10976177>
Bob Wilson [Sat, 21 Apr 2012 00:21:42 +0000 (00:21 +0000)]
Link with Foundation whenever -fobjc-link-runtime is used.  <rdar://10976177>

The check for excluding libarclite on i386 MacOSX should not apply to
Foundation.

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

12 years ago[libclang] Don't set dylib load address to 0xe000000.
Argyrios Kyrtzidis [Fri, 20 Apr 2012 22:07:11 +0000 (22:07 +0000)]
[libclang] Don't set dylib load address to 0xe000000.

Per Greg Clayton:
libclang.dylib is trying to be smart and load itself at a valid address
to be able to load faster which would work for 32 bit systems,
bit won't make any difference on 64 bit systems.
It should either pick a better 64 bit address, or just let itself be loaded at zero.

rdar://11159142

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

12 years agoobjective-c arc: With currnt documentation,
Fariborz Jahanian [Fri, 20 Apr 2012 22:00:46 +0000 (22:00 +0000)]
objective-c arc: With currnt documentation,
objc_returns_inner_pointer attribute can be applied to
methods only. Diagnsose otherwise, instead of
crashing. // rdar://11253688

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

12 years ago[analyzer] Run remove dead bindings right before leaving a function.
Anna Zaks [Fri, 20 Apr 2012 21:59:08 +0000 (21:59 +0000)]
[analyzer] Run remove dead bindings right before leaving a function.

This is needed to ensure that we always report issues in the correct
function. For example, leaks are identified when we call remove dead
bindings. In order to make sure we report a callee's leak in the callee,
we have to run the operation in the callee's context.

This change required quite a bit of infrastructure work since:
 - We used to only run remove dead bindings before a given statement;
here we need to run it after the last statement in the function. For
this, we added additional Program Point and special mode in the
SymbolReaper to remove all symbols in context lower than the current
one.
 - The call exit operation turned into a sequence of nodes, which are
now guarded by CallExitBegin and CallExitEnd nodes for clarity and
convenience.

(Sorry for the long diff.)

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

12 years ago[analyzer] Remove unused method.
Anna Zaks [Fri, 20 Apr 2012 21:59:00 +0000 (21:59 +0000)]
[analyzer] Remove unused method.

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

12 years ago[analyzer] Constify
Anna Zaks [Fri, 20 Apr 2012 21:58:56 +0000 (21:58 +0000)]
[analyzer] Constify

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

12 years agoUpdate doxygen comment to match changes in r155218.
Richard Smith [Fri, 20 Apr 2012 20:34:25 +0000 (20:34 +0000)]
Update doxygen comment to match changes in r155218.

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

12 years agoIn r135308, -save-temps was modified to prevent a temporary file from
Chad Rosier [Fri, 20 Apr 2012 20:05:08 +0000 (20:05 +0000)]
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

12 years agoFix bug where a class's (deleted) copy constructor would be implicitly given a
Richard Smith [Fri, 20 Apr 2012 18:46:14 +0000 (18:46 +0000)]
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

12 years agoc++11 status: Replace references to "SVN" with "3.1" to avoid confusion when they...
Benjamin Kramer [Fri, 20 Apr 2012 18:43:50 +0000 (18:43 +0000)]
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

12 years agoWhen generating the clang crash diagnostic script, strip out the -o flag.
Chad Rosier [Fri, 20 Apr 2012 17:21:42 +0000 (17:21 +0000)]
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

12 years agoAdd a little hack to emulate a clang crash, so the diagnostics generator can be
Chad Rosier [Fri, 20 Apr 2012 17:08:59 +0000 (17:08 +0000)]
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

12 years agominor improvement to couple of tests.
Fariborz Jahanian [Fri, 20 Apr 2012 17:07:07 +0000 (17:07 +0000)]
minor improvement to couple of tests.

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

12 years agoNo need to put the SourceManager in with the ASTContext, as the ASTContext
Manuel Klimek [Fri, 20 Apr 2012 14:07:01 +0000 (14:07 +0000)]
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

12 years agoPass -mfloat-abi= to linuxtools assembler.
Evgeniy Stepanov [Fri, 20 Apr 2012 09:03:40 +0000 (09:03 +0000)]
Pass -mfloat-abi= to linuxtools assembler.

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

12 years agoFix bug 12574 - Avoid infinite recursion in constructors and destructors when using...
Timur Iskhodzhanov [Fri, 20 Apr 2012 08:05:00 +0000 (08:05 +0000)]
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

12 years agoReplace r155185 with a better fix, which also addresses PR12557. When looking
Richard Smith [Fri, 20 Apr 2012 07:12:26 +0000 (07:12 +0000)]
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

12 years agoFix a bug which creduce found reducing PR12585.
Richard Smith [Fri, 20 Apr 2012 05:42:36 +0000 (05:42 +0000)]
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

12 years agoWhen generating the clang crash diagnostic script, strip out the -D, -F, and -I
Chad Rosier [Fri, 20 Apr 2012 00:30:04 +0000 (00:30 +0000)]
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

12 years agoobjective-arc: Retune my previous patch so warning
Fariborz Jahanian [Thu, 19 Apr 2012 23:49:39 +0000 (23:49 +0000)]
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

12 years agoRe-add the closing '}' for the namespace I accidentally deleted when
Kaelyn Uhrain [Thu, 19 Apr 2012 23:26:12 +0000 (23:26 +0000)]
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

12 years agoIn Parser::isCXXDeclarationSpecifier, consider a non-type identifier
Kaelyn Uhrain [Thu, 19 Apr 2012 23:17:45 +0000 (23:17 +0000)]
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

12 years agoIn an attempt to reduce confusion, mark 'Strong compare exchange' as done, since
Richard Smith [Thu, 19 Apr 2012 22:09:22 +0000 (22:09 +0000)]
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

12 years agoobjective-c arc: Issue warning under -Wreceiver-is-weak
Fariborz Jahanian [Thu, 19 Apr 2012 21:44:57 +0000 (21:44 +0000)]
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

12 years agoAdded equivalent method calls in examples.
Patrick Beard [Thu, 19 Apr 2012 20:48:09 +0000 (20:48 +0000)]
Added equivalent method calls in examples.

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

12 years agoFormatting fix.
Richard Smith [Thu, 19 Apr 2012 17:46:52 +0000 (17:46 +0000)]
Formatting fix.

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

12 years agoAdd SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
David Blaikie [Thu, 19 Apr 2012 17:26:49 +0000 (17:26 +0000)]
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

12 years agoFix a broken link. Patch by Nikola Smiljanic.
David Blaikie [Thu, 19 Apr 2012 17:21:46 +0000 (17:21 +0000)]
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

12 years agoRefactor the thread safety analysis so that it is easier to do
DeLesley Hutchins [Thu, 19 Apr 2012 16:48:43 +0000 (16:48 +0000)]
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

12 years agoobjective-c modern translator: Further improving the last
Fariborz Jahanian [Thu, 19 Apr 2012 16:30:28 +0000 (16:30 +0000)]
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

12 years agoThread safety analysis: split warnings into two groups: attribute warnings
DeLesley Hutchins [Thu, 19 Apr 2012 16:10:44 +0000 (16:10 +0000)]
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

12 years agoClarified encoding of boxed C strings, balanced all <p> with </p>.
Patrick Beard [Thu, 19 Apr 2012 14:33:55 +0000 (14:33 +0000)]
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

12 years agoAdds a unit test for the RecursiveASTVisitor.
Manuel Klimek [Thu, 19 Apr 2012 08:48:53 +0000 (08:48 +0000)]
Adds a unit test for the RecursiveASTVisitor.

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