]> granicus.if.org Git - clang/log
clang
10 years agoDriver: Restore -fkeep-inline-functions as an ignored flag
Justin Bogner [Wed, 27 Aug 2014 05:12:35 +0000 (05:12 +0000)]
Driver: Restore -fkeep-inline-functions as an ignored flag

Several options were moved to the clang_ignored_gcc_optimization group
in r213365, but -fkeep-inline-functions was accidentally dropped. This
restores the flag.

Patch by Steven Wu. Thanks!

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

10 years agoFix representation of __attribute__((nonnull)) to support correctly modeling
Richard Smith [Wed, 27 Aug 2014 04:59:42 +0000 (04:59 +0000)]
Fix representation of __attribute__((nonnull)) to support correctly modeling
the no-arguments case. Don't expand this to an __attribute__((nonnull(A, B,
C))) attribute, since that does the wrong thing for function templates and
varargs functions.

In passing, fix a grammar error in the diagnostic, a crash if
__attribute__((nonnull(N))) is applied to a varargs function,
a bug where the same null argument could be diagnosed multiple
times if there were multiple nonnull attributes referring to it,
and a bug where nonnull attributes would not be accumulated correctly
across redeclarations.

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

10 years agoChange a few methods to static methods. No functionality change.
Richard Trieu [Wed, 27 Aug 2014 04:45:30 +0000 (04:45 +0000)]
Change a few methods to static methods.  No functionality change.

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

10 years agoPR20760: Don't assert (and produce better diagnostics) if a default initializer
Richard Smith [Wed, 27 Aug 2014 03:23:12 +0000 (03:23 +0000)]
PR20760: Don't assert (and produce better diagnostics) if a default initializer
contains an unmatched closing bracket token.

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

10 years agoRefactor the diagnostic DeclContext printing. No functionality change.
Richard Trieu [Wed, 27 Aug 2014 03:05:19 +0000 (03:05 +0000)]
Refactor the diagnostic DeclContext printing.  No functionality change.

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

10 years agoClangCodeGenTests: Prune redundant libdeps.
NAKAMURA Takumi [Wed, 27 Aug 2014 01:50:11 +0000 (01:50 +0000)]
ClangCodeGenTests: Prune redundant libdeps.

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

10 years ago[CMake] ClangCodeGenTests: Add Core. It's referenced by the test.
NAKAMURA Takumi [Wed, 27 Aug 2014 01:50:00 +0000 (01:50 +0000)]
[CMake] ClangCodeGenTests: Add Core. It's referenced by the test.

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

10 years agoClangCodeGenTests: Reorder libdeps.
NAKAMURA Takumi [Wed, 27 Aug 2014 01:49:49 +0000 (01:49 +0000)]
ClangCodeGenTests: Reorder libdeps.

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

10 years agoClangCodeGenTests: Quick fix to USEDLIBS. clangCodeGen requires, at least, AST, Basic...
NAKAMURA Takumi [Wed, 27 Aug 2014 00:58:19 +0000 (00:58 +0000)]
ClangCodeGenTests: Quick fix to USEDLIBS. clangCodeGen requires, at least, AST, Basic, Frontend, and Lex.

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

10 years agoRe-apply r216491 (Win64 ABI shouldn't extend integer type arguments.)
Julien Lerouge [Wed, 27 Aug 2014 00:36:55 +0000 (00:36 +0000)]
Re-apply r216491 (Win64 ABI shouldn't extend integer type arguments.)

This time though, preserve the extension for bool types since that's compatible
with what MSVC expects.

See http://reviews.llvm.org/D4380

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

10 years agoFix missing component.
Julien Lerouge [Wed, 27 Aug 2014 00:33:21 +0000 (00:33 +0000)]
Fix missing component.

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

10 years ago[modules] Don't assert when merging virtual functions that override other
Richard Smith [Tue, 26 Aug 2014 23:29:11 +0000 (23:29 +0000)]
[modules] Don't assert when merging virtual functions that override other
functions. Also don't needlessly pull in non-canonical declarations of the
overridden virtual functions.

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

10 years agoclang-format: Don't butcher __asm blocks.
Daniel Jasper [Tue, 26 Aug 2014 23:15:12 +0000 (23:15 +0000)]
clang-format: Don't butcher __asm blocks.

Instead completely cop out of formatting them for now.

This fixes llvm.org/PR20618.

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

10 years agoAttempt to address cmake buildbot failure
Keno Fischer [Tue, 26 Aug 2014 22:50:03 +0000 (22:50 +0000)]
Attempt to address cmake buildbot failure

CMake gets confused by the fact that both LLVM and Clang now have
a CodeGen unittest. Rename the target to avoid that. The new test
was also missing ProfileData (thanks to Julien Lerouge for
pointing that out)

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

10 years agoRevert 216491, it breaks CodeGenCXX/microsoft-abi-member-pointers.cpp
Julien Lerouge [Tue, 26 Aug 2014 22:11:53 +0000 (22:11 +0000)]
Revert 216491, it breaks CodeGenCXX/microsoft-abi-member-pointers.cpp

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

10 years agoDon't segfault in EmitCXXGlobalInitFunc when main file is a membuf
Keno Fischer [Tue, 26 Aug 2014 22:10:15 +0000 (22:10 +0000)]
Don't segfault in EmitCXXGlobalInitFunc when main file is a membuf

Summary: When the main file is created from a membuffer, there is no file entry that can be retrieved. This uses "__GLOBAL_I_a" in that case which is what was always used before r208128.

Reviewers: majnemer, thakis

Reviewed By: thakis

Subscribers: yaron.keren, rsmith, cfe-commits

Differential Revision: http://reviews.llvm.org/D5043

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 26 Aug 2014 22:00:14 +0000 (22:00 +0000)]
Update for llvm api change.

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

10 years agoWin64 ABI shouldn't extend integer type arguments.
Julien Lerouge [Tue, 26 Aug 2014 21:52:27 +0000 (21:52 +0000)]
Win64 ABI shouldn't extend integer type arguments.

Summary:
MSVC doesn't extend integer types smaller than 64bit, so to preserve
binary compatibility, clang shouldn't either.

For example, the following C code built with MSVC:

unsigned test(unsigned v);
unsigned foobar(unsigned short);
int main() { return test(0xffffffff) + foobar(28); }

Produces the following:

  0000000000000004: B9 FF FF FF FF     mov         ecx,0FFFFFFFFh
  0000000000000009: E8 00 00 00 00     call        test
  000000000000000E: 89 44 24 20        mov         dword ptr [rsp+20h],eax
  0000000000000012: 66 B9 1C 00        mov         cx,1Ch
  0000000000000016: E8 00 00 00 00     call        foobar

And as you can see, when setting up the call to foobar, only cx is overwritten.

If foobar is compiled with clang, then the zero extension added by clang means
the rest of the register, which contains garbage, could be used.

For example if foobar is:

unsigned foobar(unsigned short v) {
    return v;
}

Compiled with clang -fomit-frame-pointer -O3 gives the following assembly:

foobar:
  0000000000000000: 89 C8              mov         eax,ecx
  0000000000000002: C3                 ret

And that function would return garbage because the 16 most significant bits of
ecx still contain garbage from the first call.

With this change, the code for that function is now:

foobar:
  0000000000000000: 0F B7 C1           movzx       eax,cx
  0000000000000003: C3                 ret

Reviewers: chapuni, rnk

Reviewed By: rnk

Subscribers: majnemer, cfe-commits

Differential Revision: http://reviews.llvm.org/D4380

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

10 years agoClarify comment so this doesn't appear to be a C11-only rule.
Richard Smith [Tue, 26 Aug 2014 21:51:57 +0000 (21:51 +0000)]
Clarify comment so this doesn't appear to be a C11-only rule.

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

10 years agoUpdate for llvm api change
Rafael Espindola [Tue, 26 Aug 2014 21:49:29 +0000 (21:49 +0000)]
Update for llvm api change

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

10 years agorevert patch r216469.
Fariborz Jahanian [Tue, 26 Aug 2014 21:10:47 +0000 (21:10 +0000)]
revert patch r216469.

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

10 years ago[libclang] Fixup the cursor spelling range for C++ destructors, operator overloads...
Argyrios Kyrtzidis [Tue, 26 Aug 2014 20:23:26 +0000 (20:23 +0000)]
[libclang] Fixup the cursor spelling range for C++ destructors, operator overloads, and conversion functions.

Patch by Craig Tenenbaum!

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

10 years agoFix an incorrect assert condition added in r216410.
Alexey Samsonov [Tue, 26 Aug 2014 20:18:26 +0000 (20:18 +0000)]
Fix an incorrect assert condition added in r216410.

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

10 years agoReturn a std::unique_ptr from getBufferForFile. NFC.
Rafael Espindola [Tue, 26 Aug 2014 20:17:44 +0000 (20:17 +0000)]
Return a std::unique_ptr from getBufferForFile. NFC.

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

10 years agoIgnore -fdevirtualize and -fdevirtualize-speculatively for gcc compat
Reid Kleckner [Tue, 26 Aug 2014 19:57:01 +0000 (19:57 +0000)]
Ignore -fdevirtualize and -fdevirtualize-speculatively for gcc compat

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

10 years agoReturn a std::unique_ptr from getBufferForFile. NFC.
Rafael Espindola [Tue, 26 Aug 2014 19:54:40 +0000 (19:54 +0000)]
Return a std::unique_ptr from getBufferForFile. NFC.

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

10 years ago[test/CodeGen/ARM] Update arm_neon_intrinsics test case to actually test the
Quentin Colombet [Tue, 26 Aug 2014 18:43:31 +0000 (18:43 +0000)]
[test/CodeGen/ARM] Update arm_neon_intrinsics test case to actually test the
lowering of the intrinsics.
Prior to this commit, most of the copy-related intrinsics could be optimized
away. The situation is still not ideal as there are several possibilities to
lower a given intrinsic. Currently, we match LLVM behavior.

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

10 years agoConvert MC command line flag for fatal assembler warnings into a proper
Joerg Sonnenberger [Tue, 26 Aug 2014 18:40:25 +0000 (18:40 +0000)]
Convert MC command line flag for fatal assembler warnings into a proper
flag.

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

10 years agoc11- Check for c11 language option as documentation says
Fariborz Jahanian [Tue, 26 Aug 2014 18:13:47 +0000 (18:13 +0000)]
c11- Check for c11 language option as documentation says
feature is c11 about nested struct declarations must have
struct-declarator-list. Without this change, code
which was meant for c99 breaks. rdar://18125536

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 26 Aug 2014 17:29:49 +0000 (17:29 +0000)]
Update for llvm api change.

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

10 years agoSwitching from std::vector to llvm::ArrayRef per post-commit review suggestion.
Aaron Ballman [Tue, 26 Aug 2014 17:05:57 +0000 (17:05 +0000)]
Switching from std::vector to llvm::ArrayRef per post-commit review suggestion.

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

10 years agoSome versions of MSVC do not support initializer list construction of vectors, so...
Aaron Ballman [Tue, 26 Aug 2014 14:17:25 +0000 (14:17 +0000)]
Some versions of MSVC do not support initializer list construction of vectors, so this fixes a broken build from r216385.

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

10 years agoThis test was updated in r216397, but was failing on Windows due to mixed path separa...
Aaron Ballman [Tue, 26 Aug 2014 14:09:25 +0000 (14:09 +0000)]
This test was updated in r216397, but was failing on Windows due to mixed path separators as well as case sensitivity of the "no" in "no such file or directory." Rather than revert this file back to its original form, I've made some incredibly ugly regexes so that it will pass everywhere.

Note, the path this test reports a failure on (for my Windows setup) is: E:\llvm\llvm\tools\clang\test\Frontend/doesnotexist/somename

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

10 years agoarm_acle: Add mappings for dbg intrinsic
Yi Kong [Tue, 26 Aug 2014 12:48:11 +0000 (12:48 +0000)]
arm_acle: Add mappings for dbg intrinsic

This completes all ACLE hint intrinsics.

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

10 years agoARM: Add dbg builtin intrinsic
Yi Kong [Tue, 26 Aug 2014 12:48:06 +0000 (12:48 +0000)]
ARM: Add dbg builtin intrinsic

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

10 years agoclang-format: New option SpacesInSquareBrackets.
Daniel Jasper [Tue, 26 Aug 2014 11:41:14 +0000 (11:41 +0000)]
clang-format: New option SpacesInSquareBrackets.

Before:
  int a[5];
  a[3] += 42;

After:
  int a[ 5 ];
  a[ 3 ] += 42;

Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887).

Patch by Marek Kurdej, thank you!

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

10 years ago[ASan/Win] Add an extra thunk.lib to handle stack-use-after-return option
Timur Iskhodzhanov [Tue, 26 Aug 2014 10:08:24 +0000 (10:08 +0000)]
[ASan/Win] Add an extra thunk.lib to handle stack-use-after-return option

With this patch, "check-asan" passes all the tests with both MT and MD ASan RTL if you set COMPILER_RT_BUILD_SHARED_ASAN to ON
(PR20214)

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

10 years agoarm_acle: Implement swap intrinsic
Yi Kong [Tue, 26 Aug 2014 09:50:54 +0000 (09:50 +0000)]
arm_acle: Implement swap intrinsic

Insert the LDREX/STREX instruction sequence specified in ARM ACLE 2.0,
as SWP instruction is deprecated since ARMv6.

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

10 years agoclang-format: Improve handling of block comments in braced lists.
Daniel Jasper [Tue, 26 Aug 2014 09:37:52 +0000 (09:37 +0000)]
clang-format: Improve handling of block comments in braced lists.

Before:
  std::vector<int> v = {
      1, 0 /* comment */
  };

After:
  std::vector<int> v = {1, 0 /* comment */};

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

10 years agoPassing a variable to std::move now counts as a use for -Wuninitialized
Richard Trieu [Tue, 26 Aug 2014 04:30:55 +0000 (04:30 +0000)]
Passing a variable to std::move now counts as a use for -Wuninitialized

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

10 years ago[modules] Track the described template in an alias declaration that is the
Richard Smith [Tue, 26 Aug 2014 03:52:16 +0000 (03:52 +0000)]
[modules] Track the described template in an alias declaration that is the
pattern of an alias template declaration. Use this to merge alias templates
properly when they're members of class template specializations.

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

10 years ago[clang/asan] call __asan_poison_cxx_array_cookie after operator new[]
Kostya Serebryany [Tue, 26 Aug 2014 02:29:59 +0000 (02:29 +0000)]
[clang/asan] call __asan_poison_cxx_array_cookie after operator new[]

Summary:
PR19838
When operator new[] is called and an array cookie is created
we want asan to detect buffer overflow bugs that touch the cookie.
For that we need to
  a) poison the shadow for the array cookie (call __asan_poison_cxx_array_cookie).
  b) ignore the legal accesses to the cookie generated by clang (add 'nosanitize' metadata)

Reviewers: timurrrr, samsonov, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4774

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

10 years agoFix typo.
Richard Smith [Mon, 25 Aug 2014 23:33:46 +0000 (23:33 +0000)]
Fix typo.

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

10 years agoPass actual CXXConstructExpr instead of argument iterators
Alexey Samsonov [Mon, 25 Aug 2014 21:58:56 +0000 (21:58 +0000)]
Pass actual CXXConstructExpr instead of argument iterators
into EmitSynthesizedCXXCopyCtorCall. No functionality change.

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

10 years agoObjective-C. Allow [super initialize] in an +initialize
Fariborz Jahanian [Mon, 25 Aug 2014 21:27:38 +0000 (21:27 +0000)]
Objective-C. Allow [super initialize] in an +initialize
implementation but not anywhere else.
rdar://16628028

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

10 years agoObjective-C modernization. Convert -initWithUTF8String messaging
Fariborz Jahanian [Mon, 25 Aug 2014 20:22:25 +0000 (20:22 +0000)]
Objective-C modernization. Convert -initWithUTF8String messaging
with auto-boxing syntax for literals. rdar://18080352

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

10 years agoPass actual CallExpr instead of CallExpr-specific iterators
Alexey Samsonov [Mon, 25 Aug 2014 20:17:35 +0000 (20:17 +0000)]
Pass actual CallExpr instead of CallExpr-specific iterators
into EmitCXXMemberOrOperatorCall methods. In the end we want
to make declaration visible in EmitCallArgs() method, that
would allow us to alter CodeGen depending on function/parameter
attributes.

No functionality change.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Mon, 25 Aug 2014 18:17:04 +0000 (18:17 +0000)]
Update for llvm api change.

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

10 years agoASTVector: Fix return value of various insert() methods.
Will Dietz [Mon, 25 Aug 2014 16:09:51 +0000 (16:09 +0000)]
ASTVector: Fix return value of various insert() methods.

Error caught using -fsanitize=pointer-overflow.

Expand ASTVectorTest to verify basic behavior,
test fails without functionality in this patch.

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

10 years agoFollow-up to r216380: update test expectations
Timur Iskhodzhanov [Mon, 25 Aug 2014 12:19:12 +0000 (12:19 +0000)]
Follow-up to r216380: update test expectations

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

10 years ago[ASan] Rename the ASan dynamic RT
Timur Iskhodzhanov [Mon, 25 Aug 2014 11:44:06 +0000 (11:44 +0000)]
[ASan] Rename the ASan dynamic RT

Reviewed at http://reviews.llvm.org/D5026

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

10 years agoAdd hasAttr matcher for declarations.
Manuel Klimek [Mon, 25 Aug 2014 11:23:50 +0000 (11:23 +0000)]
Add hasAttr matcher for declarations.

Delete special-case CUDA attribute matchers.

Patch by Jacques Pienaar.

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

10 years agoclang-format: Understand sequenced casts.
Daniel Jasper [Mon, 25 Aug 2014 09:36:07 +0000 (09:36 +0000)]
clang-format: Understand sequenced casts.

This fixed llvm.org/PR20712.

Before:
  int i = (int)(int) -2;

After:
  int i = (int)(int)-2;

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

10 years agoclang-format: Improve formatting of nested builder-type calls.
Daniel Jasper [Mon, 25 Aug 2014 08:48:17 +0000 (08:48 +0000)]
clang-format: Improve formatting of nested builder-type calls.

Before:
  f(FirstToken->WhitespaceRange.getBegin().getLocWithOffset(
      First->LastNewlineOffset));

After:
  f(FirstToken->WhitespaceRange.getBegin()
        .getLocWithOffset(First->LastNewlineOffset));

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

10 years agoUse range based for loops to avoid needing to re-mention SmallPtrSet size.
Craig Topper [Mon, 25 Aug 2014 04:15:02 +0000 (04:15 +0000)]
Use range based for loops to avoid needing to re-mention SmallPtrSet size.

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

10 years ago[modules] Fix false report of an ODR violation when merging friend
Richard Smith [Mon, 25 Aug 2014 02:10:01 +0000 (02:10 +0000)]
[modules] Fix false report of an ODR violation when merging friend
declarations. We can't expect to find them in the canonical definition
of the class, because that's not where they live.

This means we no longer reject real ODR violations with friend declarations,
but we weren't consistently doing so anyway.

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

10 years agoPR20716 - Crash when recovering from type in known dependent base.
Nikola Smiljanic [Sun, 24 Aug 2014 23:28:47 +0000 (23:28 +0000)]
PR20716 - Crash when recovering from type in known dependent base.

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

10 years agoFrontend: unique_ptr-ify
Dylan Noblesmith [Sun, 24 Aug 2014 18:59:52 +0000 (18:59 +0000)]
Frontend: unique_ptr-ify

NFC.

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

10 years agoMove __vector long deprecation checking into DeclSpec::Finish
Hal Finkel [Sun, 24 Aug 2014 04:50:19 +0000 (04:50 +0000)]
Move __vector long deprecation checking into DeclSpec::Finish

__vector long is deprecated, but __vector long long is not. As a result, we
cannot check for __vector long (to issue the deprecation warning) as we parse
the type because we need to know how many 'long's we have first.
DeclSpec::Finish seems like a more-appropriate place to perform the check
(which places it with several other similar Altivec vector checks).

Fixes PR20720.

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

10 years agoImplement __builtin_signbitl for PowerPC
Hal Finkel [Sun, 24 Aug 2014 03:47:06 +0000 (03:47 +0000)]
Implement __builtin_signbitl for PowerPC

PowerPC uses the special PPC_FP128 type for long double on Linux, which is
composed of two 64-bit doubles. The higher-order double (which contains the
overall sign) comes first, and so the __builtin_signbitl implementation
requires special handling to extract the sign bit.

Fixes PR20691.

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

10 years agoDon't assert on different DLL attributes in template and explicit instantiation ...
Hans Wennborg [Sun, 24 Aug 2014 00:12:36 +0000 (00:12 +0000)]
Don't assert on different DLL attributes in template and explicit instantiation (PR20137)

We would previously assert (a decl cannot have two DLL attributes) on this code:

  template <typename T> struct __declspec(dllimport) S { T f() { return T(); } };
  template struct __declspec(dllexport) S<int>;

The problem was that when instantiating, we would take the attribute from the
template even if the instantiation itself already had an attribute.

Also, don't inherit DLL attributes from the template to its members before
instantiation, as the attribute may change.

I couldn't figure out what MinGW does here, so I'm leaving that open. At least
we're not asserting anymore.

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

10 years agoAdd another test for DLL attribute inheritance to partial specializations
Hans Wennborg [Sat, 23 Aug 2014 23:00:29 +0000 (23:00 +0000)]
Add another test for DLL attribute inheritance to partial specializations

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

10 years agoFix CodeGenCXX/dllexport.cpp test. Somehow this slipped out of my previous commit.
Hans Wennborg [Sat, 23 Aug 2014 22:46:24 +0000 (22:46 +0000)]
Fix CodeGenCXX/dllexport.cpp test. Somehow this slipped out of my previous commit.

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

10 years agoMS ABI: Inherit DLL attributes to partial class template specializations
Hans Wennborg [Sat, 23 Aug 2014 22:34:43 +0000 (22:34 +0000)]
MS ABI: Inherit DLL attributes to partial class template specializations

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

10 years agocheckDLLAttribute: remove a redundant dyn_cast
Hans Wennborg [Sat, 23 Aug 2014 21:10:39 +0000 (21:10 +0000)]
checkDLLAttribute: remove a redundant dyn_cast

The same dyn_cast was done earlier in the function. No functionality change.

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

10 years agoCodeGen: Skip unnamed bitfields when handling designated initializers
David Majnemer [Sat, 23 Aug 2014 01:48:50 +0000 (01:48 +0000)]
CodeGen: Skip unnamed bitfields when handling designated initializers

We would accidently initialize unnamed bitfields instead of the
following field.

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

10 years ago[modules] When merging a tag declaration that has a typedef name for linkage
Richard Smith [Sat, 23 Aug 2014 01:45:27 +0000 (01:45 +0000)]
[modules] When merging a tag declaration that has a typedef name for linkage
purposes, look for other typedefs with that same name and merge into their
named tag declaration if there is one.

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

10 years ago[modules] Put class template declarations into the scope in which they're
Richard Smith [Sat, 23 Aug 2014 00:49:01 +0000 (00:49 +0000)]
[modules] Put class template declarations into the scope in which they're
declared, rather than putting them into the template parameter scope. We
previously had *no record* in the scope for class template declarations, once
those declarations completed and their template parameter scopes were popped.
This in turn caused us to be unable to merge class template declarations that
were declared in the global scope (where we use scope lookup rather than
DeclContext lookup for merging), when loading a module.

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

10 years agoFix a bad location in -Wparentheses fix-it hint
Richard Trieu [Sat, 23 Aug 2014 00:30:57 +0000 (00:30 +0000)]
Fix a bad location in -Wparentheses fix-it hint

The code used getLocStart() instead of getLocEnd().  This works for single
token expressions, but breaks if the expression is longer.

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

10 years agoObjective-C. Warn when @encode'ing provides an incomplete
Fariborz Jahanian [Fri, 22 Aug 2014 23:17:52 +0000 (23:17 +0000)]
Objective-C. Warn when @encode'ing provides an incomplete
type encoding because in certain cases, such as for vector
types, because we still haven't designed encoding for them.
rdar://9255564

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

10 years agoDebugInfo: Test that the loop backedge in a range-for is attribute to the loop header.
David Blaikie [Fri, 22 Aug 2014 22:29:50 +0000 (22:29 +0000)]
DebugInfo: Test that the loop backedge in a range-for is attribute to the loop header.

This already works, but somewhat by accident (due to the order of
emission in clang, the location is set to the loop header (during the
emission of the iteratior increment) before the loop backedge is
emitted), so let's just add a test for symmetry and future-proofing.

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

10 years agoDebugInfo: for loop backedge should be attributed to the start of the for statement.
David Blaikie [Fri, 22 Aug 2014 22:25:37 +0000 (22:25 +0000)]
DebugInfo: for loop backedge should be attributed to the start of the for statement.

Similar to r215768 (which fixed the same case for while loops). To quote
r215768's commit message:

"A little test case simplification - this could be simplified further,
though there are certainly interesting connections to the if/else
construct so I'm hesitant to remove that entirely though it does appear
somewhat unrelated.

(similar fix to r215766, related to PR19864)"

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

10 years agoClear the clang release notes to make room for 3.6.
Rafael Espindola [Fri, 22 Aug 2014 21:59:11 +0000 (21:59 +0000)]
Clear the clang release notes to make room for 3.6.

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

10 years agoDebugInfo: Provide scopes for C++11 range-for loop variables similar to r216288 ...
David Blaikie [Fri, 22 Aug 2014 21:54:29 +0000 (21:54 +0000)]
DebugInfo: Provide scopes for C++11 range-for loop variables similar to r216288 (which was for plain-for loop condition variables).

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

10 years agoDebugInfo: Scope for condition variables more narrowly than the loop variable.
David Blaikie [Fri, 22 Aug 2014 21:37:04 +0000 (21:37 +0000)]
DebugInfo: Scope for condition variables more narrowly than the loop variable.

for loops introduce two scopes - one for the outer loop variable and its
initialization, and another for the body of the loop, including any
variable declared inside the loop condition.

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

10 years agoIgnore -Wunsupported-dll-base-class-template by default
Hans Wennborg [Fri, 22 Aug 2014 20:33:18 +0000 (20:33 +0000)]
Ignore -Wunsupported-dll-base-class-template by default

The situation it is warning about (see PR20725) is not very likely
to be a real problem, and it is unclear what action the user should take
if the warning does fire.

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

10 years agoObjective-C. Update my previous patch to not warn if
Fariborz Jahanian [Fri, 22 Aug 2014 19:52:49 +0000 (19:52 +0000)]
Objective-C. Update my previous patch to not warn if
+initialize is called on 'super' in its implementation.
rdar://16628028

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

10 years agoFix PR17239 by changing the semantics of the RemainingArgsClass Option kind
Reid Kleckner [Fri, 22 Aug 2014 19:29:30 +0000 (19:29 +0000)]
Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind

This patch aims at fixing PR17239.

This bug happens because the /link (clang-cl.exe argument) is marked as
"consume all remaining arguments". However, when inside a response file,
/link should only consume all remaining arguments inside the response
file where it is located, not the entire command line after expansion.
The LLVM side of the patch will change the semantics of the
RemainingArgsClass kind to always consume only until the end of the
response file when the option originally came from a response file.
There are only two options in this class: dash dash (--) and /link.

This is the Clang side of the patch in http://reviews.llvm.org/D4899

Reviewered By: rafael, rnk

Differential Revision: http://reviews.llvm.org/D4900

Patch by Rafael Auler!

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

10 years ago[test/CodeGen/ARM] Adpat test to match new codegen after r216274.
Quentin Colombet [Fri, 22 Aug 2014 18:08:37 +0000 (18:08 +0000)]
[test/CodeGen/ARM] Adpat test to match new codegen after r216274.
Moreover, rework some patterns to actually check the emitted instructions
instead of matching unrelated string!

E.g.,
some of the "// CHECK: vmov" were matching stuff like ".globl
funcname_with_vmov" instead of actual instructions.

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

10 years ago[analyzer] Remove check covered by -Wobjc-missing-super-calls.
Jordan Rose [Fri, 22 Aug 2014 16:57:33 +0000 (16:57 +0000)]
[analyzer] Remove check covered by -Wobjc-missing-super-calls.

The ObjCDealloc checker is currently disabled because it was too aggressive, but this
is a good first step in getting it back to a useful state.

Patch by David Kilzer!

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

10 years agoObjective-C. Warn if user has made explicit call
Fariborz Jahanian [Fri, 22 Aug 2014 16:57:26 +0000 (16:57 +0000)]
Objective-C. Warn if user has made explicit call
to +initilize as this results in an extra call
to this method. rdar://16628028

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

10 years ago-fms-extensions: Alias _intNN to __intNN
Reid Kleckner [Fri, 22 Aug 2014 16:52:57 +0000 (16:52 +0000)]
-fms-extensions: Alias _intNN to __intNN

Fixes build for SPEC 2000 CPU. MSVC disables these aliases under /Za,
which enables stricter standards compliance. We don't currently have any
way to disable them.

Patch by Kevin Smith!

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

10 years agoFixing MSVC warning: "warning C4373: 'blah': virtual function overrides 'blah', previ...
Aaron Ballman [Fri, 22 Aug 2014 13:26:37 +0000 (13:26 +0000)]
Fixing MSVC warning: "warning C4373: 'blah': virtual function overrides 'blah', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers."

This warning is basically useless because the "previous versions" being referred to is MSVC 2005 and earlier, and we obviously do not care about them. However, this warning isn't particularly chatty (I don't recall ever seeing it previously), and it has the opportunity to point out cases where the cv-qualifiers differ unintentionally (like this case), so I am leaving it enabled for now.

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

10 years ago[AArch64, inline-asm] Improve diagnostic that is printed when the size of a
Akira Hatanaka [Fri, 22 Aug 2014 06:05:21 +0000 (06:05 +0000)]
[AArch64, inline-asm] Improve diagnostic that is printed when the size of a
variable that has regiser constraint "r" is not 64-bit.

General register operands are output using 64-bit "x" register names, regardless
of the size of the variable, unless the asm operand is prefixed with the "%w"
modifier. This surprises and confuses many users who aren't familiar with
aarch64 inline assembly rules.

With this commit, a note and fixit hint are printed which tell the users that
they need modifier "%w" in order to output a "w" register instead of an "x"
register.

<rdar://problem/12764785>

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

10 years agoMS ABI: Don't use the Itanium scheme for numbering lambdas
David Majnemer [Fri, 22 Aug 2014 04:22:50 +0000 (04:22 +0000)]
MS ABI: Don't use the Itanium scheme for numbering lambdas

The Itanium ABI will give out the same mangling number for two different
lambdas if their call operators have different types.  The MS ABI cannot
do the same because it does not mangle the return type into it's
lambdas.

This fixes PR20719.

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

10 years agoFix PR20705, crash on invalid.
Richard Trieu [Fri, 22 Aug 2014 01:16:44 +0000 (01:16 +0000)]
Fix PR20705, crash on invalid.

dyn_cast -> dyn_cast_or_null to handle a null pointer.

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

10 years agoCGCall: Factor out the logic mapping call arguments to LLVM IR arguments.
Alexey Samsonov [Fri, 22 Aug 2014 01:06:06 +0000 (01:06 +0000)]
CGCall: Factor out the logic mapping call arguments to LLVM IR arguments.

Summary:
This refactoring introduces ClangToLLVMArgMapping class, which
encapsulates the information about the order in which function arguments listed
in CGFunctionInfo should be passed to actual LLVM IR function, such as:
1) positions of sret, if there is any
2) position of inalloca argument, if there is any
3) position of helper padding argument for each call argument
4) positions of regular argument (there can be many if it's expanded).
Simplify several related methods (ConstructAttributeList, EmitFunctionProlog
and EmitCall): now they don't have to maintain iterators over the list
of LLVM IR function arguments, dealing with all the sret/inalloca/this complexities,
and just use expected positions of LLVM IR arguments stored in ClangToLLVMArgMapping.

This may increase the running time of EmitFunctionProlog, as we have to traverse
expandable arguments twice, but in further refactoring we will be able
to speed up EmitCall by passing already calculated CallArgsToIRArgsMapping to
ConstructAttributeList, thus avoiding traversing expandable argument there.

No functionality change.

Test Plan: regression test suite

Reviewers: majnemer, rnk

Reviewed By: rnk

Subscribers: cfe-commits, rjmccall, timurrrr

Differential Revision: http://reviews.llvm.org/D4938

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

10 years ago[test/CodeGen/ARM] Adpat test to match new codegen after r216236.
Quentin Colombet [Fri, 22 Aug 2014 00:27:52 +0000 (00:27 +0000)]
[test/CodeGen/ARM] Adpat test to match new codegen after r216236.

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

10 years agoUpdate for LLVM API change to remove discriminator tracking from DILexicalBlock ...
David Blaikie [Thu, 21 Aug 2014 22:46:45 +0000 (22:46 +0000)]
Update for LLVM API change to remove discriminator tracking from DILexicalBlock (in favor of DILexicalBlockFile - where a default arg is used to avoid the need for API churn of those callers)

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

10 years agoUpdate Clang for LLVM API change to use unique_ptr in SourceManager::AddNewSourceBuffer
David Blaikie [Thu, 21 Aug 2014 21:01:00 +0000 (21:01 +0000)]
Update Clang for LLVM API change to use unique_ptr in SourceManager::AddNewSourceBuffer

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

10 years agoReturn statements are initialization; don't forget to revert the initializer to
Richard Smith [Thu, 21 Aug 2014 20:51:13 +0000 (20:51 +0000)]
Return statements are initialization; don't forget to revert the initializer to
its syntactic form before re-analyzing it during template instantiation.

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

10 years agoSimplify this logic now that -W can't be applied to remarks. No functionality change.
Richard Smith [Thu, 21 Aug 2014 20:44:44 +0000 (20:44 +0000)]
Simplify this logic now that -W can't be applied to remarks. No functionality change.

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

10 years agoFix grammatical error in diagnostic.
Richard Smith [Thu, 21 Aug 2014 20:43:52 +0000 (20:43 +0000)]
Fix grammatical error in diagnostic.

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

10 years agoPass expressions instead of argument ranges to EmitCall/EmitCXXConstructorCall.
Alexey Samsonov [Thu, 21 Aug 2014 20:26:47 +0000 (20:26 +0000)]
Pass expressions instead of argument ranges to EmitCall/EmitCXXConstructorCall.

Summary:
This is a first small step towards passing generic "Expr" instead of
ArgBeg/ArgEnd pair into EmitCallArgs() family of methods. Having "Expr" will
allow us to get the corresponding FunctionDecl and its ParmVarDecls,
thus allowing us to alter CodeGen depending on the function/parameter
attributes.

No functionality change.

Test Plan: regression test suite

Reviewers: rnk

Reviewed By: rnk

Subscribers: aemerson, cfe-commits

Differential Revision: http://reviews.llvm.org/D4915

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

10 years agoCoverage Mapping: store function's hash in coverage function records.
Alex Lorenz [Thu, 21 Aug 2014 19:25:27 +0000 (19:25 +0000)]
Coverage Mapping: store function's hash in coverage function records.

The profile data format was recently updated and the new indexing api
requires the code coverage tool to know the function's hash as well
as the function's name to get the execution counts for a function.

Differential Revision: http://reviews.llvm.org/D4995

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

10 years agoRefactor TLI creation. NFC.
Rafael Espindola [Thu, 21 Aug 2014 17:58:42 +0000 (17:58 +0000)]
Refactor TLI creation. NFC.

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

10 years agoObjective-C. Recover from missing interface decl.
Fariborz Jahanian [Thu, 21 Aug 2014 17:06:57 +0000 (17:06 +0000)]
Objective-C. Recover from missing interface decl.
and checking on availability of method declaration
instead of crashing. // rdar://18059669

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

10 years agoRange'ify some for loops over RecordDecl::fields()
Hans Wennborg [Thu, 21 Aug 2014 16:06:57 +0000 (16:06 +0000)]
Range'ify some for loops over RecordDecl::fields()

No functionality change.

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

10 years agoR600: Implement getPointerWidthV()
Tom Stellard [Thu, 21 Aug 2014 13:58:40 +0000 (13:58 +0000)]
R600: Implement getPointerWidthV()

This fixes a crash in the OCL_ImgProc/Canny OpenCV test.

NOTE: This is a candidate for the 3.5 branch.

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

10 years agoR600: Add processor type for hainan
Tom Stellard [Thu, 21 Aug 2014 13:58:38 +0000 (13:58 +0000)]
R600: Add processor type for hainan

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