]> granicus.if.org Git - clang/log
clang
12 years agoDocumentation cleanup: reformatting/fixing up file comments so that they have
James Dennett [Mon, 2 Jul 2012 07:01:42 +0000 (07:01 +0000)]
Documentation cleanup: reformatting/fixing up file comments so that they have
\file and \brief markup and appear in Doxygen's summaries (and eventually at
http://clang.llvm.org/doxygen/files.html).  Fixed up another couple of minor
glitches in the docs at the same time.

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

12 years agoRename tzcnt intrinsics to match gcc.
Craig Topper [Mon, 2 Jul 2012 06:52:51 +0000 (06:52 +0000)]
Rename tzcnt intrinsics to match gcc.

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

12 years agoAdditional testing for fixes in r158289 and r158290 to allow implicitly-declared
Richard Smith [Mon, 2 Jul 2012 06:15:40 +0000 (06:15 +0000)]
Additional testing for fixes in r158289 and r158290 to allow implicitly-declared
constructors for non-literal types to be constexpr in some circumstances.

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

12 years agoPR13189: va_list broken with precompiled headers
Meador Inge [Sun, 1 Jul 2012 15:57:25 +0000 (15:57 +0000)]
PR13189: va_list broken with precompiled headers

For some targets a structure named __va_list_tag is built to help define
the __builtin_va_list type.  However, __va_list_tag was not being treated as a
predefined type thus causing problems when serializing the AST.  This commit
fixes that oversight by adding the necessary support to treat __va_list_tag
as a predefined type.

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

12 years agoc-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c...
NAKAMURA Takumi [Sun, 1 Jul 2012 00:40:17 +0000 (00:40 +0000)]
c-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c-index-test yet.

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

12 years agoAdd support for the C11 _Alignof keyword.
Jordan Rose [Sat, 30 Jun 2012 21:33:57 +0000 (21:33 +0000)]
Add support for the C11 _Alignof keyword.

This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.

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

12 years ago[libclang] Make implementation filename match the header's name for CXCompilationDatabase
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 20:43:43 +0000 (20:43 +0000)]
[libclang] Make implementation filename match the header's name for CXCompilationDatabase

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

12 years ago[cindex.py] Fix comments
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 20:43:37 +0000 (20:43 +0000)]
[cindex.py] Fix comments

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

12 years ago[libclang] Fix autoconf library dependencies for tooling support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 12:49:09 +0000 (12:49 +0000)]
[libclang] Fix autoconf library dependencies for tooling support

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

12 years agoc-index-test.c: Fix missing semicolon(s).
NAKAMURA Takumi [Sat, 30 Jun 2012 11:47:18 +0000 (11:47 +0000)]
c-index-test.c: Fix missing semicolon(s).

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

12 years ago[cindex.py] add CompilationDatabase support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 11:28:04 +0000 (11:28 +0000)]
[cindex.py] add CompilationDatabase support

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

12 years ago[libclang] add CompilationDatabase support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 11:27:57 +0000 (11:27 +0000)]
[libclang] add CompilationDatabase support

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

12 years agoSwitch Clang to use the new common LLVM CMake infrastructure for adding
Chandler Carruth [Sat, 30 Jun 2012 10:14:27 +0000 (10:14 +0000)]
Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

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

12 years agoAdd a missing argument index, wordsmith a little, and 80(ish) columns
Matt Beaumont-Gay [Sat, 30 Jun 2012 01:37:38 +0000 (01:37 +0000)]
Add a missing argument index, wordsmith a little, and 80(ish) columns

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

12 years agoblocks: fixes a crash when encoding block type
Fariborz Jahanian [Sat, 30 Jun 2012 00:48:59 +0000 (00:48 +0000)]
blocks: fixes a crash when encoding block type
with argument type of size 0. // rdar://11777609
PR13229.

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

12 years agotest/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.
NAKAMURA Takumi [Sat, 30 Jun 2012 00:29:03 +0000 (00:29 +0000)]
test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.

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

12 years agoRemove dependency on string.h
Fariborz Jahanian [Fri, 29 Jun 2012 23:48:43 +0000 (23:48 +0000)]
Remove dependency on string.h

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

12 years agoUnbreak the test from r159469.
David Blaikie [Fri, 29 Jun 2012 23:16:06 +0000 (23:16 +0000)]
Unbreak the test from r159469.

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

12 years agoFix typos from r159463 and update tests. Added Matt Beaumont-Gay's suggestion
Richard Trieu [Fri, 29 Jun 2012 23:11:10 +0000 (23:11 +0000)]
Fix typos from r159463 and update tests.  Added Matt Beaumont-Gay's suggestion
to improve wording of a diagnostic message.

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

12 years agoobjective-c IRGen: fixes a crash when method type is being mangled
Fariborz Jahanian [Fri, 29 Jun 2012 22:54:56 +0000 (22:54 +0000)]
objective-c IRGen: fixes a crash when method type is being mangled
when an argument type size is 0. // rdar://11777609, PR13229

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

12 years agoUse -frewrite-includes for crash reports.
David Blaikie [Fri, 29 Jun 2012 22:03:56 +0000 (22:03 +0000)]
Use -frewrite-includes for crash reports.

In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
  preferring a location that is properly cleaned up by lit.

Review by Chandler Carruth.

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

12 years agoIn Sema::ClassifyName, try to avoid nonsensical corrections to
Kaelyn Uhrain [Fri, 29 Jun 2012 21:30:39 +0000 (21:30 +0000)]
In Sema::ClassifyName, try to avoid nonsensical corrections to
keywords when doing type correction.

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

12 years agoUpdate the %diff modifer to have an alternate string print when a template tree
Richard Trieu [Fri, 29 Jun 2012 21:12:16 +0000 (21:12 +0000)]
Update the %diff modifer to have an alternate string print when a template tree
is selected.  This will allow more flexibility when converting diagnostics to
use template type diffing.

Also updated the internal manual and test cases for correctly keeping the bold
attribute and for tree printing.

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

12 years agoRevert "Tweak insecureAPI analyzer checks to have the ability to be individually...
Ted Kremenek [Fri, 29 Jun 2012 21:01:35 +0000 (21:01 +0000)]
Revert "Tweak insecureAPI analyzer checks to have the ability to be individually disabled."

Jordan Rose corrected me that this actually isn't needed.

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

12 years agoTweak insecureAPI analyzer checks to have the ability to be individually disabled.
Ted Kremenek [Fri, 29 Jun 2012 20:44:58 +0000 (20:44 +0000)]
Tweak insecureAPI analyzer checks to have the ability to be individually disabled.

The solution is a bit inefficient: it creates N checkers, one for each check, and
each check does a dispatch on the function name.  This is redundant, but we can fix
this once we have the proper ability to enable/disable subchecks.

Fixes <rdar://problem/11780180>.

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

12 years agoAdd a fix-it hint note to -Wunique-enum to suggest that the last element gets
Richard Trieu [Fri, 29 Jun 2012 20:36:14 +0000 (20:36 +0000)]
Add a fix-it hint note to -Wunique-enum to suggest that the last element gets
initialized with the next to last element to silence the warning.

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

12 years agoobjective-c modern translator: synthesize argument type
Fariborz Jahanian [Fri, 29 Jun 2012 19:55:46 +0000 (19:55 +0000)]
objective-c modern translator: synthesize argument type
correctly for blocks and function pointer arguments
in the written constructor.  // rdar://11359268

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

12 years agomodern objc translator: string.h is unavailable on some non-OSX
Fariborz Jahanian [Fri, 29 Jun 2012 19:33:05 +0000 (19:33 +0000)]
modern objc translator: string.h is unavailable on some non-OSX
platforms declare memset in rewritten code instead.

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

12 years agofix a typo in my last commit. I thought I recompiled,
Fariborz Jahanian [Fri, 29 Jun 2012 19:05:11 +0000 (19:05 +0000)]
fix a typo in my last commit. I thought I recompiled,
but apparently I did not.

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

12 years agoobjc diagnostic: pass IdentifierInfo* to the diagnostic system
Fariborz Jahanian [Fri, 29 Jun 2012 18:43:30 +0000 (18:43 +0000)]
objc diagnostic: pass  IdentifierInfo* to the diagnostic system
to produce quotes instead of adding qoute to the test.

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

12 years agostd::nullptr_t support in MS headers, from João Matos.
Douglas Gregor [Fri, 29 Jun 2012 18:28:41 +0000 (18:28 +0000)]
std::nullptr_t support in MS headers, from João Matos.

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

12 years agoPatch for handling C99 veriadic macros when using precompiled headers,
Douglas Gregor [Fri, 29 Jun 2012 18:27:59 +0000 (18:27 +0000)]
Patch for handling C99 veriadic macros when using precompiled headers,
from Filipe Cabecinhas!

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

12 years agoobjective-c modern translator: Translation into objc_msgSend_stret
Fariborz Jahanian [Fri, 29 Jun 2012 18:27:08 +0000 (18:27 +0000)]
objective-c modern translator: Translation into objc_msgSend_stret
entry point which requires nil check before calling objc_msgSend_stret.
// rdar://11359268 - wip.

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

12 years agoFactor out a check for block commands (that implicitly start a new paragraph) into...
Dmitri Gribenko [Fri, 29 Jun 2012 18:19:20 +0000 (18:19 +0000)]
Factor out a check for block commands (that implicitly start a new paragraph) into a separate function.

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

12 years agoAvoid redundant error when redefining a function as deleted.
David Blaikie [Fri, 29 Jun 2012 18:00:25 +0000 (18:00 +0000)]
Avoid redundant error when redefining a function as deleted.

Reviewed by Doug Gregor.

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

12 years agoChange condition to be the same as in SemaTemplateInstantiate.
Nico Weber [Fri, 29 Jun 2012 16:39:58 +0000 (16:39 +0000)]
Change condition to be the same as in SemaTemplateInstantiate.

No functionality change.

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

12 years agoclang/test/Misc/diag-template-diffing-color.cpp: Remove XFAIL:cygwin. Cygwin has...
NAKAMURA Takumi [Fri, 29 Jun 2012 14:14:25 +0000 (14:14 +0000)]
clang/test/Misc/diag-template-diffing-color.cpp: Remove XFAIL:cygwin. Cygwin has some terminal emulation of escape sequences.

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

12 years agoUpdate Clang to reflect the new home of IRBuilder.h as of r159421.
Chandler Carruth [Fri, 29 Jun 2012 12:39:08 +0000 (12:39 +0000)]
Update Clang to reflect the new home of IRBuilder.h as of r159421.

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

12 years agoUpdate based on move of DIBuilder.h to include/llvm.
Bill Wendling [Fri, 29 Jun 2012 08:32:29 +0000 (08:32 +0000)]
Update based on move of DIBuilder.h to include/llvm.

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

12 years agoFrom Philippe Canal:
Axel Naumann [Fri, 29 Jun 2012 07:30:33 +0000 (07:30 +0000)]
From Philippe Canal:
Update the two function overloads
    void TemplateSpecializationType::PrintTemplateArgumentList(raw_ostream &OS,....
to behave like
    std::string TemplateSpecializationType::PrintTemplateArgumentList(const TemplateArgument *Args,...
hence making sure that clang consistently adds a space between two '>' at the end of nested template arguments.

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

12 years agoX86: add more GATHER intrinsics in Clang
Manman Ren [Fri, 29 Jun 2012 05:19:13 +0000 (05:19 +0000)]
X86: add more GATHER intrinsics in Clang

Support the following intrinsics:
  _mm_i32gather_pd, _mm256_i32gather_pd,
  _mm_i64gather_pd, _mm256_i64gather_pd,
  _mm_i32gather_ps, _mm256_i32gather_ps,
  _mm_i64gather_ps, _mm256_i64gather_ps,
  _mm_i32gather_epi64, _mm256_i32gather_epi64,
  _mm_i64gather_epi64, _mm256_i64gather_epi64,
  _mm_i32gather_epi32, _mm256_i32gather_epi32,
  _mm_i64gather_epi32, _mm256_i64gather_epi32

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

12 years agoFix PR13234 - crash when trying to report an unsupported ABI feature
Timur Iskhodzhanov [Fri, 29 Jun 2012 01:14:21 +0000 (01:14 +0000)]
Fix PR13234 - crash when trying to report an unsupported ABI feature

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

12 years agoWhen a builtin that requires a constant is given a type- or
Douglas Gregor [Fri, 29 Jun 2012 01:05:22 +0000 (01:05 +0000)]
When a builtin that requires a constant is given a type- or
value-dependent expression, don't complain that it wasn't the constant
we wanted. Fixes <rdar://problem/11688587> and PR11074.

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

12 years agoX86: add more GATHER intrinsics in Clang
Manman Ren [Fri, 29 Jun 2012 00:54:35 +0000 (00:54 +0000)]
X86: add more GATHER intrinsics in Clang

Corrected type for index of _mm256_mask_i32gather_pd
  from 256-bit to 128-bit
Corrected types for src|dst|mask of _mm256_mask_i64gather_ps
  from 256-bit to 128-bit

Support the following intrinsics:
  _mm_mask_i32gather_epi64, _mm256_mask_i32gather_epi64,
  _mm_mask_i64gather_epi64, _mm256_mask_i64gather_epi64,
  _mm_mask_i32gather_epi32, _mm256_mask_i32gather_epi32,
  _mm_mask_i64gather_epi32, _mm256_mask_i64gather_epi32

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

12 years agoTeach the __is_trivially_assignable and __is_trivially_constructible
Douglas Gregor [Fri, 29 Jun 2012 00:49:17 +0000 (00:49 +0000)]
Teach the __is_trivially_assignable and __is_trivially_constructible
type traits that assignment to/construction of a lifetime-qualified
object under ARC is *not* trivial. Fixes <rdar://problem/11738725>.

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

12 years agoSwitch Clang's CMake lit.site.cfg generation over to use the common
Chandler Carruth [Fri, 29 Jun 2012 00:39:23 +0000 (00:39 +0000)]
Switch Clang's CMake lit.site.cfg generation over to use the common
helpers rather than its own special-rolled code.

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

12 years ago[analyzer] Add a test that we are, in fact, doing a DFS on the ExplodedGraph.
Jordan Rose [Fri, 29 Jun 2012 00:33:10 +0000 (00:33 +0000)]
[analyzer] Add a test that we are, in fact, doing a DFS on the ExplodedGraph.

Previously:
...the comment said DFS...
...the WorkList being instantiated said BFS...
...and the implementation was actually DFS...
...due to an unintentional change in 2010...
...and everything kept working anyway.

This fixes our std::deque implementation of BFS, but switches back to a
SmallVector-based implementation of DFS.

We should probably still investigate the ramifications of DFS vs. BFS,
especially for large functions (and especially when we hit our block path
limit), since this might completely change our memory use. It can also mask
some bugs and reveal others depending on when we halt analysis. But at least
we will not have this kind of little mistake creep in again.

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

12 years agoWarn on self-assignment to member variables. PR13104.
Nico Weber [Thu, 28 Jun 2012 23:53:12 +0000 (23:53 +0000)]
Warn on self-assignment to member variables. PR13104.

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

12 years agoThread safety analysis: support release() function on scoped
DeLesley Hutchins [Thu, 28 Jun 2012 22:42:48 +0000 (22:42 +0000)]
Thread safety analysis:  support release() function on scoped
lockable objects.

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

12 years agoWhen applying a template diff highlighting to a diagnostic message, remember
Richard Trieu [Thu, 28 Jun 2012 22:39:03 +0000 (22:39 +0000)]
When applying a template diff highlighting to a diagnostic message, remember
to reapply the bold formatting when needed.

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

12 years agoFactor CXString out of Index.h
Arnaud A. de Grandmaison [Thu, 28 Jun 2012 22:01:06 +0000 (22:01 +0000)]
Factor CXString out of Index.h

No functionnal or interface change. This is done to prepare the landing of
CompilationDatabase in libclang.

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

12 years agoFix template type diffing coloring (r159216) when forcing color output to a file...
David Blaikie [Thu, 28 Jun 2012 21:46:07 +0000 (21:46 +0000)]
Fix template type diffing coloring (r159216) when forcing color output to a file (not a terminal)

Reviewed (over the shoulder) by Richard Trieu.

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

12 years agoSupport the use of "=delete" and "=default" with delayed template
Douglas Gregor [Thu, 28 Jun 2012 21:43:01 +0000 (21:43 +0000)]
Support the use of "=delete" and "=default" with delayed template
parsing. Fixes <rdar://problem/11700604>.

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

12 years agoobjective-c rewriter: refactoring of rewriting of
Fariborz Jahanian [Thu, 28 Jun 2012 21:20:35 +0000 (21:20 +0000)]
objective-c rewriter: refactoring of rewriting of
objc_msgSend_stret() API. No functionality change.

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

12 years ago[libclang] Don't bind a StringRef to a temporary std::string object.
Argyrios Kyrtzidis [Thu, 28 Jun 2012 21:03:08 +0000 (21:03 +0000)]
[libclang] Don't bind a StringRef to a temporary std::string object.
It may end up pointing at garbage.

Fixes the MSVC debug build. rdar://11703319

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

12 years agoDead code eliminate the massive hexagon builtin intrinsic supporting code.
Benjamin Kramer [Thu, 28 Jun 2012 20:08:55 +0000 (20:08 +0000)]
Dead code eliminate the massive hexagon builtin intrinsic supporting code.

The tablegen'd code does the same thing without this egregious duplication.
In my limited testing everything seems to work, however there can be
differences if the clang and llvm builtin definitions don't match.

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

12 years agoOnly print a semicolon after "no known conversion for Nth argument" if there
Matt Beaumont-Gay [Thu, 28 Jun 2012 19:20:41 +0000 (19:20 +0000)]
Only print a semicolon after "no known conversion for Nth argument" if there
is a following clause.

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

12 years agoNow that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritt...
Benjamin Kramer [Thu, 28 Jun 2012 19:10:01 +0000 (19:10 +0000)]
Now that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritten emitter.

The generated code uncovered an invalid prototype for __builtin_mips_shilo, fix it along the way.

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

12 years agoSupport MIPS DSP Rev1 intrinsics.
Simon Atanasyan [Thu, 28 Jun 2012 18:23:16 +0000 (18:23 +0000)]
Support MIPS DSP Rev1 intrinsics.
This patch was reviewed in the llvm-commits list by Jim Grosbach.

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

12 years agoCompare the canonical types and document why we give up on the covariant case.
Rafael Espindola [Thu, 28 Jun 2012 17:57:36 +0000 (17:57 +0000)]
Compare the canonical types and document why we give up on the covariant case.

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

12 years agoWarn on weak properties declared in protocols as well.
Jordan Rose [Thu, 28 Jun 2012 16:39:28 +0000 (16:39 +0000)]
Warn on weak properties declared in protocols as well.

Previously this caused a crash, since protocols are not interfaces.

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

12 years agoRemove redundant check.
Dmitri Gribenko [Thu, 28 Jun 2012 16:25:36 +0000 (16:25 +0000)]
Remove redundant check.

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

12 years agoAttaching comments to declarations: don't attach comments to implicit declarations.
Dmitri Gribenko [Thu, 28 Jun 2012 16:19:39 +0000 (16:19 +0000)]
Attaching comments to declarations: don't attach comments to implicit declarations.

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

12 years agoDisable devirtualization when we have covariant returns. I will open a bug
Rafael Espindola [Thu, 28 Jun 2012 15:11:39 +0000 (15:11 +0000)]
Disable devirtualization when we have covariant returns. I will open a bug
for tracking this.

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

12 years agoDon't devirtualize calls when we don't have the correct type of the this pointer
Rafael Espindola [Thu, 28 Jun 2012 14:28:57 +0000 (14:28 +0000)]
Don't devirtualize calls when we don't have the correct type of the this pointer
handy. It can be done, but we would have to build a derived-to-base cast
during codegen to compute the correct this pointer.

I will handle covariant returns next.

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

12 years agoAdd -ftls-model command-line flag.
Hans Wennborg [Thu, 28 Jun 2012 08:01:44 +0000 (08:01 +0000)]
Add -ftls-model command-line flag.

This allows for setting the default TLS model. (PR9788)

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

12 years agoAdd warning flag -Winvalid-pp-token for preprocessing-tokens which have
Richard Smith [Thu, 28 Jun 2012 07:51:56 +0000 (07:51 +0000)]
Add warning flag -Winvalid-pp-token for preprocessing-tokens which have
undefined behaviour, and move the diagnostic for '' from an Error into
an ExtWarn in this group. This is important for some users of the preprocessor,
and is necessary for gcc compatibility.

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

12 years agoFix another issue with devirtualizing calls to final methods by passing them
Rafael Espindola [Thu, 28 Jun 2012 01:56:38 +0000 (01:56 +0000)]
Fix another issue with devirtualizing calls to final methods by passing them
the correct this pointer. There is some potential for sharing a bit more
code with canDevirtualizeMemberFunctionCalls, but that can be done in an
independent patch.

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

12 years agoCleanup \brief comment. Since it is a single paragraph, no need to save newlines...
Dmitri Gribenko [Thu, 28 Jun 2012 01:38:21 +0000 (01:38 +0000)]
Cleanup \brief comment.  Since it is a single paragraph, no need to save newlines there.

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

12 years agoFix grammar.
Eric Christopher [Thu, 28 Jun 2012 01:20:05 +0000 (01:20 +0000)]
Fix grammar.

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

12 years agoUpdate the #include to find the DebugInfo.h in the correct place
Bill Wendling [Thu, 28 Jun 2012 00:30:19 +0000 (00:30 +0000)]
Update the #include to find the DebugInfo.h in the correct place

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

12 years agoTeach \brief parser about commands that start a new paragraph implicitly
Dmitri Gribenko [Thu, 28 Jun 2012 00:01:41 +0000 (00:01 +0000)]
Teach \brief parser about commands that start a new paragraph implicitly

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

12 years agoFix uninitialized variable use bug found by the clairvoyant static analyzer.
Argyrios Kyrtzidis [Wed, 27 Jun 2012 23:45:44 +0000 (23:45 +0000)]
Fix uninitialized variable use bug found by the clairvoyant static analyzer.

Commit::canReplaceText would not initialize its out 'Len' parameter before
returning true and it would be used uninitialized in Commit::replaceText.

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

12 years agoAttaching documentation comments to declarations: don't attach a comment to a declara...
Dmitri Gribenko [Wed, 27 Jun 2012 23:43:37 +0000 (23:43 +0000)]
Attaching documentation comments to declarations: don't attach a comment to a declaration if there is a preprocessor directive between them.

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

12 years agoFix an infinite loop in comment lexer: we were not advancing in the input character...
Dmitri Gribenko [Wed, 27 Jun 2012 23:28:29 +0000 (23:28 +0000)]
Fix an infinite loop in comment lexer: we were not advancing in the input character stream when we saw a '<' that is not a start of an HTML tag.

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

12 years agoTwo more tests for PR13207 - wrong mangling of templates with back references [-cxx...
Timur Iskhodzhanov [Wed, 27 Jun 2012 21:53:00 +0000 (21:53 +0000)]
Two more tests for PR13207 - wrong mangling of templates with back references [-cxx-abi microsoft]

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

12 years agoPropagate lvalue alignment into bitfields. Per report on cfe-dev.
Eli Friedman [Wed, 27 Jun 2012 21:19:48 +0000 (21:19 +0000)]
Propagate lvalue alignment into bitfields.  Per report on cfe-dev.

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

12 years agoobjective-c mrc: Issue warning for mrc, as is done for arc, when
Fariborz Jahanian [Wed, 27 Jun 2012 20:52:46 +0000 (20:52 +0000)]
objective-c mrc: Issue warning for mrc, as is done for arc, when
property retains a block object as it could be on
the stack. // rdar://11761511

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

12 years agoRefactoring after r159290: don't hold onto and check a misleading QualType.
Richard Smith [Wed, 27 Jun 2012 20:29:39 +0000 (20:29 +0000)]
Refactoring after r159290: don't hold onto and check a misleading QualType.

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

12 years agoCheck for non-POD vararg argument type after default argument promotion, not
Richard Smith [Wed, 27 Jun 2012 20:23:58 +0000 (20:23 +0000)]
Check for non-POD vararg argument type after default argument promotion, not
before, so we don't incorrectly think arguments of function type are non-POD.

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

12 years agopatch to suggest 'static' function should be 'static inline'
Fariborz Jahanian [Wed, 27 Jun 2012 19:43:29 +0000 (19:43 +0000)]
patch to suggest 'static' function should be 'static inline'
when it appears to be unused and occurs in a header.
// rdar://11202617

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

12 years agoImplement John McCall's review of r159212 other than the this pointer not
Rafael Espindola [Wed, 27 Jun 2012 18:18:05 +0000 (18:18 +0000)]
Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.

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

12 years agoFix a crash I introduced in r159212.
Rafael Espindola [Wed, 27 Jun 2012 17:44:39 +0000 (17:44 +0000)]
Fix a crash I introduced in r159212.

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

12 years agoRemove unsigned and a pointer from a comment token (so that each token can have only...
Dmitri Gribenko [Wed, 27 Jun 2012 16:53:58 +0000 (16:53 +0000)]
Remove unsigned and a pointer from a comment token (so that each token can have only one semantic string value attached to it), at a cost of adding an additional token.

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

12 years agoComment lexer: counting backwards from token end is thought to be confusing. We...
Dmitri Gribenko [Wed, 27 Jun 2012 16:30:35 +0000 (16:30 +0000)]
Comment lexer: counting backwards from token end is thought to be confusing.  We already have a pointer to the beginning of the token, so use it to extract the text instead.

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

12 years agoAdd a test for unterminated /* comments.
Dmitri Gribenko [Wed, 27 Jun 2012 16:05:49 +0000 (16:05 +0000)]
Add a test for unterminated /* comments.

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

12 years agoFix for r159256 on Windows.
Axel Naumann [Wed, 27 Jun 2012 11:42:56 +0000 (11:42 +0000)]
Fix for r159256 on Windows.

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

12 years agoRemove a completely unused and remarkably inaccurate list of test
Chandler Carruth [Wed, 27 Jun 2012 10:06:26 +0000 (10:06 +0000)]
Remove a completely unused and remarkably inaccurate list of test
directories from the cmake file. Dunno what the history is here, but
we're not using it.

More refactorings to come here.

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

12 years agoUpdate the Clang CMake build to reflect the name change in LLVM r159258.
Chandler Carruth [Wed, 27 Jun 2012 09:49:07 +0000 (09:49 +0000)]
Update the Clang CMake build to reflect the name change in LLVM r159258.

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

12 years agoFrom Vassil Vassilev:
Axel Naumann [Wed, 27 Jun 2012 09:17:42 +0000 (09:17 +0000)]
From Vassil Vassilev:
add interface for removing a FileEntry from the cache.
Forces a re-read the contents from disk, e.g. because a tool (like cling) wants to pick up a modified file.

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

12 years agoInitialize RawComment::BriefTextValid in other constructor, too.
Dmitri Gribenko [Wed, 27 Jun 2012 05:48:36 +0000 (05:48 +0000)]
Initialize RawComment::BriefTextValid in other constructor, too.

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

12 years agoIntroduce __has_feature(attribute_unused_on_fields) to determine whether
Daniel Jasper [Wed, 27 Jun 2012 05:12:34 +0000 (05:12 +0000)]
Introduce __has_feature(attribute_unused_on_fields) to determine whether
the current version of clang understands __attribute__((unused)) on
fields.

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

12 years agoAdd missing words to manual.
Richard Trieu [Wed, 27 Jun 2012 02:36:34 +0000 (02:36 +0000)]
Add missing words to manual.

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

12 years agoAdd a few (currently failing) tests for the PR13207 (template mangling in the presenc...
Timur Iskhodzhanov [Wed, 27 Jun 2012 02:11:40 +0000 (02:11 +0000)]
Add a few (currently failing) tests for the PR13207 (template mangling in the presence of back references).

I've added an extra FileCheck pass for that with an extra "CURRENT" prefix.
I've carefully chosed the CURRENT/CORRECT prefixes so they
a) are self-descriptive
b) have the same length so the mangling between the current and the correct version is obvious

Feel free to ask me to change the prefixes if you know a better alternative.

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

12 years agoUpdate documentation with regards to template type diffing.
Richard Trieu [Wed, 27 Jun 2012 02:00:20 +0000 (02:00 +0000)]
Update documentation with regards to template type diffing.

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

12 years agoAdd a few more test cases for the -cxx-abi microsoft mangler. Some of them were broke...
Timur Iskhodzhanov [Wed, 27 Jun 2012 01:38:25 +0000 (01:38 +0000)]
Add a few more test cases for the -cxx-abi microsoft mangler. Some of them were broken recently

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

12 years agoSimplify logic in BriefParser::Parse(), per Jordan's comment.
Dmitri Gribenko [Wed, 27 Jun 2012 01:17:34 +0000 (01:17 +0000)]
Simplify logic in BriefParser::Parse(), per Jordan's comment.

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

12 years agoInitialize RawCommentList::BriefTextValid when deserializing AST.
Dmitri Gribenko [Wed, 27 Jun 2012 00:57:00 +0000 (00:57 +0000)]
Initialize RawCommentList::BriefTextValid when deserializing AST.

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

12 years ago[analyzer] RetainCountChecker: remove unused SelfOwn ArgEffect kind.
Jordan Rose [Wed, 27 Jun 2012 00:51:18 +0000 (00:51 +0000)]
[analyzer] RetainCountChecker: remove unused SelfOwn ArgEffect kind.

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

12 years ago[analyzer] Remove unneeded helper function (it's in ASTContext.h)
Jordan Rose [Wed, 27 Jun 2012 00:51:16 +0000 (00:51 +0000)]
[analyzer] Remove unneeded helper function (it's in ASTContext.h)

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