]> granicus.if.org Git - clang/log
clang
12 years agoA minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where...
Eli Friedman [Thu, 24 May 2012 21:05:41 +0000 (21:05 +0000)]
A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where "x" refers to a local variable.  This should silence a useless warning in compiler-rt and other places.

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

12 years agoXFAIL this test, which does not pass on trunk since the grand
John McCall [Thu, 24 May 2012 20:58:21 +0000 (20:58 +0000)]
XFAIL this test, which does not pass on trunk since the grand
renaming in r157403.

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

12 years agoSet svn:keywords property to Id
Ted Kremenek [Thu, 24 May 2012 20:16:00 +0000 (20:16 +0000)]
Set svn:keywords property to Id

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

12 years agoNew & improved man page attached, now with standard license added.
Ted Kremenek [Thu, 24 May 2012 20:13:47 +0000 (20:13 +0000)]
New & improved man page attached, now with standard license added.
Plus, a patch for scan-build.

* mdoc corrections
* slightly more compact output
* same license as scan-build
* DESCRIPTION describes
* Default checkers corrected & explained
* Authors credited

The patch adds support for --help-checkers.  It just lists the default
checkers by recursively invoking "scan-build -h" and looking for the
magic '+' signs.

Patch by James Lowden!

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

12 years agoobjective-c: Fixes a corner case and interesting bug.
Fariborz Jahanian [Thu, 24 May 2012 18:29:41 +0000 (18:29 +0000)]
objective-c: Fixes a corner case and interesting bug.
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://11363363

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

12 years ago[objcmt] Add test case for r157395.
Argyrios Kyrtzidis [Thu, 24 May 2012 17:49:22 +0000 (17:49 +0000)]
[objcmt] Add test case for r157395.

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

12 years agoReplace PTX back-end with NVPTX back-end in all places where Clang cares
Justin Holewinski [Thu, 24 May 2012 17:43:12 +0000 (17:43 +0000)]
Replace PTX back-end with NVPTX back-end in all places where Clang cares

NV_CONTRIB

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

12 years ago[analyzer] Minor cleanup to checkers' help text.
Anna Zaks [Thu, 24 May 2012 17:31:59 +0000 (17:31 +0000)]
[analyzer] Minor cleanup to checkers' help text.

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

12 years ago[analyzer] Treat cast of array to reference in the same way as array to
Anna Zaks [Thu, 24 May 2012 17:31:57 +0000 (17:31 +0000)]
[analyzer] Treat cast of array to reference in the same way as array to
pointer.

Fixes one of the crashes reported in PR12874.

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

12 years ago[analyzer] Fix typo. Thanks Jordy.
Anna Zaks [Thu, 24 May 2012 17:31:54 +0000 (17:31 +0000)]
[analyzer] Fix typo. Thanks Jordy.

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

12 years agoAdds menu sidebar to the docs.
Manuel Klimek [Thu, 24 May 2012 17:16:23 +0000 (17:16 +0000)]
Adds menu sidebar to the docs.

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

12 years agoUpdates the tooling docs with the links to the tutorials and
Manuel Klimek [Thu, 24 May 2012 17:09:10 +0000 (17:09 +0000)]
Updates the tooling docs with the links to the tutorials and
adds the menu include.

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

12 years agoAdds a tutorial for how to write clang plugins.
Manuel Klimek [Thu, 24 May 2012 17:07:18 +0000 (17:07 +0000)]
Adds a tutorial for how to write clang plugins.

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

12 years ago[objcmt] Warn when modern objc migrator does not convert a NSNumber message because...
Argyrios Kyrtzidis [Thu, 24 May 2012 16:48:23 +0000 (16:48 +0000)]
[objcmt] Warn when modern objc migrator does not convert a NSNumber message because it requires a cast.

rdar://11525138

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

12 years agoobjc: change option to be -Wobjc-interface-ivars
Fariborz Jahanian [Thu, 24 May 2012 16:19:51 +0000 (16:19 +0000)]
objc: change option to be -Wobjc-interface-ivars

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

12 years agoApply review comment from Jordan Rose.
Manuel Klimek [Thu, 24 May 2012 12:46:43 +0000 (12:46 +0000)]
Apply review comment from Jordan Rose.

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

12 years agoRemove 3.1 release notes to get ready for current development cycle.
Bill Wendling [Thu, 24 May 2012 06:42:56 +0000 (06:42 +0000)]
Remove 3.1 release notes to get ready for current development cycle.

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

12 years agofix Bug 12924
Seth Cantrell [Thu, 24 May 2012 05:14:44 +0000 (05:14 +0000)]
fix Bug 12924

http://llvm.org/bugs/show_bug.cgi?id=12924

This issue was that the source location was pointing to a
non-printable character and so CaretEnd was pointing one
_column_ past the caret but not one _character_ past the
caret. So the conversion between column and byte locations
wasn't working (because the conversion is only valid from
the first column or byte of a character).

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

12 years agoDR1152 / PR12931 / PR6177: A candidate function which requires binding a const
Richard Smith [Thu, 24 May 2012 04:29:20 +0000 (04:29 +0000)]
DR1152 / PR12931 / PR6177: A candidate function which requires binding a const
volatile reference to a temporary is not viable. My interpretation is that
DR1152 was a bugfix, not a rule change for C++11, so this is not conditional on
the language mode. This matches g++'s behavior.

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

12 years agoAdd a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually...
Eli Friedman [Thu, 24 May 2012 00:47:05 +0000 (00:47 +0000)]
Add a warning to diagnose statements in C++ like "*(volatile int*)x;".  Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value.  I also made a few minor improvements to existing unused value warnings in the process.  <rdar://problem/11516811>.

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

12 years agoimplement Sema support for the alloc_size attribute
Nuno Lopes [Thu, 24 May 2012 00:22:00 +0000 (00:22 +0000)]
implement Sema support for the alloc_size attribute
Portions of this patch by Xi Wang. Reviewed by Jordy Rose. Thank you both.

Codegen support will follow soon.

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

12 years agomodern objc translation: Add translation of @autoreleasepool
Fariborz Jahanian [Wed, 23 May 2012 23:47:20 +0000 (23:47 +0000)]
modern objc translation: Add translation of @autoreleasepool
statement. // rdar://11474836.

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

12 years ago[libclang] Report CXType_ObjCId for 'const id', not CXType_Typedef.
Argyrios Kyrtzidis [Wed, 23 May 2012 23:30:16 +0000 (23:30 +0000)]
[libclang] Report CXType_ObjCId for 'const id', not CXType_Typedef.

rdar://11357807

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

12 years agoclang/test/Tooling: Update comments in left 2 tests on XFAIL. They are incompatible...
NAKAMURA Takumi [Wed, 23 May 2012 22:24:33 +0000 (22:24 +0000)]
clang/test/Tooling: Update comments in left 2 tests on XFAIL. They are incompatible to -fms-compatibility.

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

12 years agoclang/test/Tooling: Tweak 4 tests to escape the path separator s/\\/\\\\/g in JSON.
NAKAMURA Takumi [Wed, 23 May 2012 22:24:27 +0000 (22:24 +0000)]
clang/test/Tooling: Tweak 4 tests to escape the path separator s/\\/\\\\/g in JSON.

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

12 years agoTooling: Canonicalize Key in IndexByFile[]. llvm::sys::path::native() may be used...
NAKAMURA Takumi [Wed, 23 May 2012 22:24:20 +0000 (22:24 +0000)]
Tooling: Canonicalize Key in IndexByFile[]. llvm::sys::path::native() may be used here.

It fixes test/Tooling on Win32 hosts.

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

12 years ago[arcmt] Remove an unused -autorelease, without failing with error, for this
Argyrios Kyrtzidis [Wed, 23 May 2012 21:50:04 +0000 (21:50 +0000)]
[arcmt] Remove an unused -autorelease, without failing with error, for this
idiom that is used commonly in setters:

   [backingValue autorelease];
   backingValue = [newValue retain]; // in general a +1 assign

rdar://9914061

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

12 years ago[driver] Have the crash diagnostics print the clang version information.
Chad Rosier [Wed, 23 May 2012 21:38:47 +0000 (21:38 +0000)]
[driver] Have the crash diagnostics print the clang version information.
rdar://11518308

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

12 years agoUpdate checker build.
Ted Kremenek [Wed, 23 May 2012 19:57:38 +0000 (19:57 +0000)]
Update checker build.

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

12 years agoAdds the Refactoring library, which is a layer on top of the Tooling library
Manuel Klimek [Wed, 23 May 2012 16:29:20 +0000 (16:29 +0000)]
Adds the Refactoring library, which is a layer on top of the Tooling library
that allows easy refactoring across translation units.

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

12 years agoCorrect the starting location for instantiations of field declarations which
Richard Smith [Wed, 23 May 2012 04:22:22 +0000 (04:22 +0000)]
Correct the starting location for instantiations of field declarations which
start with a cv-qualifier. DeclaratorDecl::getTypeSpecStartLoc() does not
produce the location of the first type-specifier (the cv-qualifier) in this
case, because we don't track source locations for cv-qualifiers.

No test here: I've not found a way to test this with a lit-style test, and
introducing a gtest test for this seems unwarranted. Suggestions welcome!

Patch by Daniel Jasper!

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

12 years agoIf the first argument of __builtin_object_size can be folded to a constant
Richard Smith [Wed, 23 May 2012 04:13:20 +0000 (04:13 +0000)]
If the first argument of __builtin_object_size can be folded to a constant
pointer, but such folding encounters side-effects, ignore the side-effects
rather than performing them at runtime: CodeGen generates wrong code for
__builtin_object_size in that case.

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

12 years agoClang 3.1 is out: turn the relevant C++11 status boxes green.
Richard Smith [Wed, 23 May 2012 01:38:11 +0000 (01:38 +0000)]
Clang 3.1 is out: turn the relevant C++11 status boxes green.

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

12 years agoMove file to be more representative.
Eric Christopher [Wed, 23 May 2012 00:18:46 +0000 (00:18 +0000)]
Move file to be more representative.

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

12 years agoCheck that we have an unknown upper bound range for our flexible array members.
Eric Christopher [Wed, 23 May 2012 00:18:43 +0000 (00:18 +0000)]
Check that we have an unknown upper bound range for our flexible array members.

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

12 years agoEmit C++11 enum class information if it exists.
Eric Christopher [Wed, 23 May 2012 00:09:47 +0000 (00:09 +0000)]
Emit C++11 enum class information if it exists.

Part of rdar://11496790

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

12 years agoRecognize the MS inheritance attributes and turn them into attributes
John McCall [Tue, 22 May 2012 21:28:12 +0000 (21:28 +0000)]
Recognize the MS inheritance attributes and turn them into attributes
on the RecordDecl.  Persist the MS portability type attributes and
ignore them in Sema rather than the parser.

Patch by João Matos!

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

12 years agoFix line endings.
John McCall [Tue, 22 May 2012 21:28:07 +0000 (21:28 +0000)]
Fix line endings.

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

12 years agoTest that we emit a subrange type for vlas.
Eric Christopher [Tue, 22 May 2012 18:04:48 +0000 (18:04 +0000)]
Test that we emit a subrange type for vlas.

Part of rdar://11457152

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

12 years agoFixes the autoconf build.
Manuel Klimek [Tue, 22 May 2012 17:45:33 +0000 (17:45 +0000)]
Fixes the autoconf build.

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

12 years agowire -fbounds-checking to the new LLVM bounds checking pass
Nuno Lopes [Tue, 22 May 2012 17:19:45 +0000 (17:19 +0000)]
wire -fbounds-checking to the new LLVM bounds checking pass

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

12 years agoAdds a method overwriteChangedFiles to the Rewriter. This is implemented by
Manuel Klimek [Tue, 22 May 2012 17:01:35 +0000 (17:01 +0000)]
Adds a method overwriteChangedFiles to the Rewriter. This is implemented by
first writing the changed files to a temporary location and then overwriting
the original files atomically.

Also adds a RewriterTestContext to aid unit testing rewrting logic in general.

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

12 years agorevert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)
Nuno Lopes [Tue, 22 May 2012 15:26:48 +0000 (15:26 +0000)]
revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)

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

12 years agoReplace inline asm constraint "=a" by the more general constraint "=r".
Simon Atanasyan [Tue, 22 May 2012 11:03:10 +0000 (11:03 +0000)]
Replace inline asm constraint "=a" by the more general constraint "=r".
That extend a range of platforms support this test case.

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

12 years agoTruthify a comment.
Richard Smith [Tue, 22 May 2012 01:41:27 +0000 (01:41 +0000)]
Truthify a comment.

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

12 years agoFix typo.
Ted Kremenek [Tue, 22 May 2012 00:54:40 +0000 (00:54 +0000)]
Fix typo.

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

12 years agoUse Perl prototypes instead of shift.
Ted Kremenek [Tue, 22 May 2012 00:52:49 +0000 (00:52 +0000)]
Use Perl prototypes instead of shift.

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

12 years ago[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
Argyrios Kyrtzidis [Tue, 22 May 2012 00:47:53 +0000 (00:47 +0000)]
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.

rdar://11501256

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

12 years agoAdd basic delta-debugging script used for reducing analyzer crasher test cases.
Ted Kremenek [Mon, 21 May 2012 23:29:01 +0000 (23:29 +0000)]
Add basic delta-debugging script used for reducing analyzer crasher test cases.

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

12 years agoobjective-c: provide a useful 'fixit' suggestion when
Fariborz Jahanian [Mon, 21 May 2012 22:43:44 +0000 (22:43 +0000)]
objective-c: provide a useful 'fixit' suggestion when
errornously using commas to separate ObjC message arguments.
// rdar://11376372

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

12 years agoRevert r115805. An array type is required to have a range type,
Eric Christopher [Mon, 21 May 2012 22:13:23 +0000 (22:13 +0000)]
Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.

Testcase to follow.

Part of rdar://11457152

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

12 years ago[analyzer] Bind UnknownVal to InitListExpr for unsupported types
Anna Zaks [Mon, 21 May 2012 22:07:00 +0000 (22:07 +0000)]
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
(ex: float).

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

12 years agoFunction template version of the previous patch.
Rafael Espindola [Mon, 21 May 2012 20:31:27 +0000 (20:31 +0000)]
Function template version of the previous patch.

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

12 years agoProduce a hidden symbol for zed in
Rafael Espindola [Mon, 21 May 2012 20:15:56 +0000 (20:15 +0000)]
Produce a hidden symbol for zed in

  struct HIDDEN foo {
  };
  template <class P>
  struct bar {
  };
  template <>
  struct HIDDEN bar<foo> {
    DEFAULT static void zed();
  };
  void bar<foo>::zed() {
  }

Before we would produce a hidden symbol in

  struct HIDDEN foo {
  };
  template <class P>
  struct bar {
  };
  template <>
  struct bar<foo> {
    DEFAULT static void zed();
  };
  void bar<foo>::zed() {
  }

But adding HIDDEN to the specialization would cause us to produce a default
symbol.

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

12 years ago[driver] When creating the compiler invocation out of command-line
Argyrios Kyrtzidis [Mon, 21 May 2012 20:11:54 +0000 (20:11 +0000)]
[driver] When creating the compiler invocation out of command-line
arguments, force use of clang frontend for the driver.

Fixes rdar://11356765.

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

12 years agoAnalyzer: Fix PR12905, a crash when encountering a call to a function named "C".
Benjamin Kramer [Mon, 21 May 2012 19:40:38 +0000 (19:40 +0000)]
Analyzer: Fix PR12905, a crash when encountering a call to a function named "C".

While there clean up indentation.

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

12 years ago[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease...
Argyrios Kyrtzidis [Mon, 21 May 2012 17:48:31 +0000 (17:48 +0000)]
[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error".

Per feedback from John this is useful to have in general.

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

12 years agoRemove unused argument in my last patch.
Fariborz Jahanian [Mon, 21 May 2012 17:10:28 +0000 (17:10 +0000)]
Remove unused argument in my last patch.

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

12 years agoobjective-c: When default synthesizing readonly IBOutlet properties
Fariborz Jahanian [Mon, 21 May 2012 17:02:43 +0000 (17:02 +0000)]
objective-c: When default synthesizing readonly IBOutlet properties
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209

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

12 years agoTest and document a difference from gcc in the handling of visibility
Rafael Espindola [Mon, 21 May 2012 14:22:37 +0000 (14:22 +0000)]
Test and document a difference from gcc in the handling of visibility
attributes.

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

12 years agoUnpack enums in CodeCompletetionResult.
Benjamin Kramer [Mon, 21 May 2012 10:42:01 +0000 (10:42 +0000)]
Unpack enums in CodeCompletetionResult.

In theory they should be wide enough even when the enum type is signed, but it
looks like MSVC9 still has problems with it.

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

12 years agoTeach Clang about the NVPTX backend.
Peter Collingbourne [Sun, 20 May 2012 23:28:41 +0000 (23:28 +0000)]
Teach Clang about the NVPTX backend.

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

12 years agoTell the driver that CUDA is a C++-like language, so that we get C++
Peter Collingbourne [Sun, 20 May 2012 23:28:36 +0000 (23:28 +0000)]
Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.

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

12 years agoCUDA: the device and host attributes must be inheritable, in order
Peter Collingbourne [Sun, 20 May 2012 23:28:32 +0000 (23:28 +0000)]
CUDA: the device and host attributes must be inheritable, in order
to deal with NVIDIA's headers.  We'll need to think of another way
to handle multiple host/device definitions within the same TU.

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

12 years agotest/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in...
NAKAMURA Takumi [Sun, 20 May 2012 22:28:03 +0000 (22:28 +0000)]
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.

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

12 years agoCUDA: add CodeGen support for global variable address spaces.
Peter Collingbourne [Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)]
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0.  This relies on address
space 0 being a unified address space.

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

12 years agoBitpack CodeCompletionResults.
Benjamin Kramer [Sun, 20 May 2012 14:19:46 +0000 (14:19 +0000)]
Bitpack CodeCompletionResults.

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

12 years agoFix test for 32-bit hosts.
Jakob Stoklund Olesen [Sun, 20 May 2012 06:43:46 +0000 (06:43 +0000)]
Fix test for 32-bit hosts.

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

12 years agoError when using typeid() with -fno-rtti. PR 12888.
Nico Weber [Sun, 20 May 2012 01:27:21 +0000 (01:27 +0000)]
Error when using typeid() with -fno-rtti. PR 12888.

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

12 years agoZap a bogus assert for delegating constructors. PR12890, part 2.
Eli Friedman [Sun, 20 May 2012 00:46:05 +0000 (00:46 +0000)]
Zap a bogus assert for delegating constructors.  PR12890, part 2.

I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.

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

12 years agoMake delegating initializers use a similar codepath to base initializers in dependent...
Eli Friedman [Sat, 19 May 2012 23:35:23 +0000 (23:35 +0000)]
Make delegating initializers use a similar codepath to base initializers in dependent contexts.  PR12890.

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

12 years agoobjective-c: Warn if default synthesizing readonly IBOutlet properties
Fariborz Jahanian [Sat, 19 May 2012 18:17:17 +0000 (18:17 +0000)]
objective-c: Warn if default synthesizing readonly IBOutlet properties
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://11448209

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

12 years agoMissing line break.
Dmitri Gribenko [Sat, 19 May 2012 17:20:59 +0000 (17:20 +0000)]
Missing line break.

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

12 years agoUse RecordDecl::field_iterator because D1, D2 are RecordDecls. No functional change.
Dmitri Gribenko [Sat, 19 May 2012 17:17:26 +0000 (17:17 +0000)]
Use RecordDecl::field_iterator because D1, D2 are RecordDecls.  No functional change.

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

12 years agoApparently empty names are allowed here.
Benjamin Kramer [Sat, 19 May 2012 16:34:46 +0000 (16:34 +0000)]
Apparently empty names are allowed here.

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

12 years agoSimplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into...
Benjamin Kramer [Sat, 19 May 2012 16:03:58 +0000 (16:03 +0000)]
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.

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

12 years agoInline a trivial clear() method.
Benjamin Kramer [Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)]
Inline a trivial clear() method.

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

12 years agoSimplify code, add an assertion.
Benjamin Kramer [Sat, 19 May 2012 10:43:54 +0000 (10:43 +0000)]
Simplify code, add an assertion.

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

12 years agoUpdate API usage for llvm DIBuilder changes for rvalue reference
Eric Christopher [Sat, 19 May 2012 01:36:50 +0000 (01:36 +0000)]
Update API usage for llvm DIBuilder changes for rvalue reference
types and ensure we are actually creating the type.

rdar://11479676

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

12 years ago[analyzer] c++11: do not crash on namespace alias
Anna Zaks [Sat, 19 May 2012 00:22:11 +0000 (00:22 +0000)]
[analyzer] c++11: do not crash on namespace alias

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

12 years ago[analyzer] For locations, use isGLValue() instead of isLValue().
Anna Zaks [Sat, 19 May 2012 00:22:07 +0000 (00:22 +0000)]
[analyzer] For locations, use isGLValue() instead of isLValue().

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

12 years agoSuggest adding 'typename' when it would make the compiler
Kaelyn Uhrain [Fri, 18 May 2012 23:42:49 +0000 (23:42 +0000)]
Suggest adding 'typename' when it would make the compiler
accept the template argument expression as a type.

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

12 years ago[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)
Anna Zaks [Fri, 18 May 2012 22:47:43 +0000 (22:47 +0000)]
[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)

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

12 years ago[analyzer] Malloc checker: remove unnecessary comparisons.
Anna Zaks [Fri, 18 May 2012 22:47:40 +0000 (22:47 +0000)]
[analyzer] Malloc checker: remove unnecessary comparisons.

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

12 years agoobjc: use "class extension" instead of "continuation class"
Fariborz Jahanian [Fri, 18 May 2012 21:22:49 +0000 (21:22 +0000)]
objc: use "class extension" instead of "continuation class"
to match documentation. // rdar://11309706

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

12 years agoLexer::ReadToEndOfLine: Only build the string if it's actually used and do so in...
Benjamin Kramer [Fri, 18 May 2012 19:32:16 +0000 (19:32 +0000)]
Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way.

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

12 years agoTypo.
Chad Rosier [Fri, 18 May 2012 16:56:52 +0000 (16:56 +0000)]
Typo.

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

12 years agoCentralize the handling of the "attribute declaration must precede definition"
Rafael Espindola [Fri, 18 May 2012 01:47:00 +0000 (01:47 +0000)]
Centralize the handling of the "attribute declaration must precede definition"
warning. This also makes us warn on tags, which, ironically, is the only case
gcc warns on.

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

12 years ago[analyzer]Malloc: refactor and report use after free by memory
Anna Zaks [Fri, 18 May 2012 01:16:10 +0000 (01:16 +0000)]
[analyzer]Malloc: refactor and report use after free by memory
allocating functions.

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

12 years agoAnother test for r157025 <rdar://problem/11460990>.
Fariborz Jahanian [Fri, 18 May 2012 00:19:25 +0000 (00:19 +0000)]
Another test for r157025  <rdar://problem/11460990>.

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

12 years agoA selector match between two Objective-C methods does *not* guarantee
Douglas Gregor [Thu, 17 May 2012 23:13:29 +0000 (23:13 +0000)]
A selector match between two Objective-C methods does *not* guarantee
that the methods have the same number of parameters, although we
certainly assumed this in many places. Objective-C can be insane
sometimes. Fixes <rdar://problem/11460990>.

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

12 years agoRemove trailing periods which snuck into a few diagnostic strings.
Matt Beaumont-Gay [Thu, 17 May 2012 22:46:56 +0000 (22:46 +0000)]
Remove trailing periods which snuck into a few diagnostic strings.

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

12 years agoIn the override search for Objective-C methods, protect against ASTs that have NULL...
Douglas Gregor [Thu, 17 May 2012 22:39:14 +0000 (22:39 +0000)]
In the override search for Objective-C methods, protect against ASTs that have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/11478173>, a recent regression

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

12 years agoDrop the question mark when complaining about a non-existing -Wno- flag.
Benjamin Kramer [Thu, 17 May 2012 21:14:26 +0000 (21:14 +0000)]
Drop the question mark when complaining about a non-existing -Wno- flag.

We're certain that it doesn't exist.

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

12 years agoAdd -mno-implicit-float to the M group.
Chad Rosier [Thu, 17 May 2012 20:53:37 +0000 (20:53 +0000)]
Add -mno-implicit-float to the M group.

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

12 years ago[arcmt] Remove the "it is not safe to remove an unused 'autorelease' message" ARC
Argyrios Kyrtzidis [Thu, 17 May 2012 18:16:05 +0000 (18:16 +0000)]
[arcmt] Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error.

This is more trouble that it is worth; autoreleasing a value without holding on it
is a valid use-case, we should not "punish" correct code for the minority of
broken/fragile programs that depend on the behavior of  -autorelease.

rdar://9914061

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

12 years ago[driver] Reword the warning message for missing value to a joined argument.
Chad Rosier [Thu, 17 May 2012 15:45:13 +0000 (15:45 +0000)]
[driver] Reword the warning message for missing value to a joined argument.

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

12 years agoAdded two missing const qualifiers.
Abramo Bagnara [Thu, 17 May 2012 12:44:05 +0000 (12:44 +0000)]
Added two missing const qualifiers.

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

12 years agoCXXThisScopeRAII objects aren't free, don't compute one if it's unused.
Benjamin Kramer [Thu, 17 May 2012 12:01:52 +0000 (12:01 +0000)]
CXXThisScopeRAII objects aren't free, don't compute one if it's unused.

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

12 years ago[tsan] grammar fixes
Kostya Serebryany [Thu, 17 May 2012 08:49:14 +0000 (08:49 +0000)]
[tsan] grammar fixes

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