]> granicus.if.org Git - clang/log
clang
8 years ago[ASTMatchers] Allow hasName() to look through inline namespaces
Samuel Benzaquen [Fri, 5 Feb 2016 18:29:24 +0000 (18:29 +0000)]
[ASTMatchers] Allow hasName() to look through inline namespaces

Summary:
Allow hasName() to look through inline namespaces.
This will fix the interaction between some clang-tidy checks and libc++.

libc++ defines names in an inline namespace named std::<version_#>.
When we try to match a name using hasName("std::xxx") it fails to match and the clang-tidy check does not work.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: Fix corner case in template detection.
Daniel Jasper [Fri, 5 Feb 2016 14:17:16 +0000 (14:17 +0000)]
clang-format: Fix corner case in template detection.

Before:
  f(a.operator() < A > ());

After:
  f(a.operator()<A>());

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

8 years ago[analyzer] Suppress localization diagnostics in debug classes and methods.
Devin Coughlin [Fri, 5 Feb 2016 04:22:15 +0000 (04:22 +0000)]
[analyzer] Suppress localization diagnostics in debug classes and methods.

If the class or method name case-insensitively contains the term "debug",
suppress warnings about string constants flowing to user-facing UI APIs.

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

8 years agoCodeGen: correct Windows ARM C++ assertion
Saleem Abdulrasool [Fri, 5 Feb 2016 04:12:40 +0000 (04:12 +0000)]
CodeGen: correct Windows ARM C++ assertion

Because the Decl is explicitly passed as nullptr further up the call chain, it
is possible to invoke isa on a nullptr, which will assert.  Guard against the
nullptr.

Take the opportunity to reuse the helper method rather than re-implementing this
logic.

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

8 years ago[CMake] One more try to make CMake clean up after itself
Chris Bieneman [Fri, 5 Feb 2016 03:59:08 +0000 (03:59 +0000)]
[CMake] One more try to make CMake clean up after itself

Seriously... CMake... You're on my list...

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

8 years agoRevert "[CMake] Improve the clang order-file generation workflow"
Chris Bieneman [Fri, 5 Feb 2016 03:40:37 +0000 (03:40 +0000)]
Revert "[CMake] Improve the clang order-file generation workflow"

This reverts commit r259862, and attempts to fix builder CMakeCaches.

Will try this again some other time...

Conflicts:

CMakeLists.txt
tools/driver/CMakeLists.txt

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

8 years ago[CMake] One more try to fix this.
Chris Bieneman [Fri, 5 Feb 2016 03:02:40 +0000 (03:02 +0000)]
[CMake] One more try to fix this.

This change will catch any bots that generated the order file that GNU ld doesn't like and delete it before trying to generate one that I think GNU ld will deal with.

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

8 years ago[CMake] Speculative fix for linker error on Linux
Chris Bieneman [Fri, 5 Feb 2016 02:51:33 +0000 (02:51 +0000)]
[CMake] Speculative fix for linker error on Linux

I can't reproduce this locally, but I think this may fix it.

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

8 years ago[modules] Factor out common code to mark identifier being "from AST", and add a
Richard Smith [Fri, 5 Feb 2016 01:40:54 +0000 (01:40 +0000)]
[modules] Factor out common code to mark identifier being "from AST", and add a
call in one more place to reduce the size of identifier tables in non-leaf
modules. No behavior change.

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

8 years ago[CMake] Trying to fix a bot failure I introduced in r259862
Chris Bieneman [Fri, 5 Feb 2016 01:27:31 +0000 (01:27 +0000)]
[CMake] Trying to fix a bot failure I introduced in r259862

CMake caching behavior makes me sad.

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

8 years ago[CMake] Improve the clang order-file generation workflow
Chris Bieneman [Fri, 5 Feb 2016 01:22:03 +0000 (01:22 +0000)]
[CMake] Improve the clang order-file generation workflow

Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

Reviewers: bogner

Subscribers: cfe-commits

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

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

8 years agoDon't synthesize an ImportDecl for a module named in -fmodule-implementation-of
Ben Langmuir [Fri, 5 Feb 2016 01:10:05 +0000 (01:10 +0000)]
Don't synthesize an ImportDecl for a module named in -fmodule-implementation-of

When building a PCH with modules enabled this import would assert in the
ASTWriter and (if assertions were disabled) sometimes crash the compiler
that loaded the resulting PCH when trying to lookup the submodule ID.

rdar://problem/24137448

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

8 years agoPR25271: When attaching default template arguments to redeclarations of a
Richard Smith [Thu, 4 Feb 2016 22:54:41 +0000 (22:54 +0000)]
PR25271: When attaching default template arguments to redeclarations of a
template, keep looking for default arguments if we see a template parameter
pack. There may be default arguments preceding a pack with no default argument.

Patch by Jannis Harder!

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

8 years agoInstall cmake files to lib/cmake/clang
Niels Ole Salscheider [Thu, 4 Feb 2016 20:08:27 +0000 (20:08 +0000)]
Install cmake files to lib/cmake/clang

This is the right location for platform-specific files.

Also, search for LLVM's CMake files in this directory.

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

8 years agoFix a crash when there is a typo in the return statement.
Manman Ren [Thu, 4 Feb 2016 20:05:40 +0000 (20:05 +0000)]
Fix a crash when there is a typo in the return statement.

If the typo happens after a successful deduction for an earlier
return statement, we should check if the deduced type is null
before using it.

The typo correction happens after we try to deduce the return
type and we ignore the deduction from the typo and continue
to typo correction.

rdar://24342247

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

8 years ago[PGO] code simplification: use existing VP annotation API /NFC
Xinliang David Li [Thu, 4 Feb 2016 19:54:17 +0000 (19:54 +0000)]
[PGO] code simplification: use existing VP annotation API /NFC

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

8 years ago[PGO] cc1 option name change for profile instrumentation
Rong Xu [Thu, 4 Feb 2016 18:39:09 +0000 (18:39 +0000)]
[PGO] cc1 option name change for profile instrumentation

This patch changes cc1 option -fprofile-instr-generate to an enum option
-fprofile-instrument={clang|none}. It also changes cc1 options
-fprofile-instr-generate= to -fprofile-instrument-path=.
The driver level option -fprofile-instr-generate and -fprofile-instr-generate=
remain intact. This change will pave the way to integrate new PGO
instrumentation in IR level.

Review: http://reviews.llvm.org/D16730

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

8 years ago[x86] Correct setting of WIntType for MCU target
Andrey Bokhanko [Thu, 4 Feb 2016 11:54:45 +0000 (11:54 +0000)]
[x86] Correct setting of WIntType for MCU target

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

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

8 years ago[OPENMP 4.0] Fixed support of array sections/array subscripts.
Alexey Bataev [Thu, 4 Feb 2016 11:27:03 +0000 (11:27 +0000)]
[OPENMP 4.0] Fixed support of array sections/array subscripts.
Codegen for array sections/array subscripts worked only for expressions with arrays as base. Patch fixes codegen for bases with pointer/reference types.

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

8 years agoAdd -nocudainc option to CUDA preprocessor test.
Samuel Antao [Thu, 4 Feb 2016 08:13:16 +0000 (08:13 +0000)]
Add -nocudainc option to CUDA preprocessor test.

If include files are used in the CUDA preprocessor tests it will cause a
failure due to a missing header file in hosts that do not match the triple
in the test. E.g. powerpc64le have CUDA support but the include files
cannot be used for an x86 target.

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

8 years agoBasic: mark TLS as supported on Windows on ARM
Saleem Abdulrasool [Thu, 4 Feb 2016 05:05:23 +0000 (05:05 +0000)]
Basic: mark TLS as supported on Windows on ARM

LLVM can now lower TLS access as per the MS ABI on ARM.  This enables the
generation of TLS access for Windows on ARM.

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

8 years agoPR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpres...
Alexey Bataev [Thu, 4 Feb 2016 04:22:09 +0000 (04:22 +0000)]
PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression, by Dmitry Polukhin
Differential Revision: http://reviews.llvm.org/D16572
A    test/Parser/cxx-ambig-paren-expr-asan.cpp
M    lib/Parse/ParseExprCXX.cpp

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

8 years agoFix predefine for __NSConstantString struct type
Ben Langmuir [Thu, 4 Feb 2016 00:55:24 +0000 (00:55 +0000)]
Fix predefine for __NSConstantString struct type

Per review feedback the name was wrong and it can be used outside
Objective-C.

Unfortunately, making the internal struct visible broke some ASTMatchers
tests that assumed that the first record decl would be from user code,
rather than a builtin type.  I'm worried that this will also affect
users' code.  So this patch adds a typedef to wrap the internal struct
and only makes the typedef visible to namelookup.  This is sufficient to
allow the ASTReader to merge the decls we need without making the struct
itself visible.

rdar://problem/24425801

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

8 years agoBump DiagnosticSemaKinds count; we're close to hitting it.
Manman Ren [Wed, 3 Feb 2016 23:35:29 +0000 (23:35 +0000)]
Bump DiagnosticSemaKinds count; we're close to hitting it.

 $ grep '= DIAG_START_SEMA' include/clang/Basic/DiagnosticIDs.h
       DIAG_START_ANALYSIS      = DIAG_START_SEMA            + 3000
 $ grep 'def ' include/clang/Basic/DiagnosticSemaKinds.td | wc -l
       2994

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

8 years agoReapply r259624, it is likely not the commit causing the bot failures.
Quentin Colombet [Wed, 3 Feb 2016 22:41:00 +0000 (22:41 +0000)]
Reapply r259624, it is likely not the commit causing the bot failures.
Original message:
Make CF constant string decl visible to name lookup to fix module errors

The return type of the __builtin___*StringMakeConstantString functions
is a pointer to a struct, so we need that struct to be visible to name
lookup so that we will correctly merge multiple declarations of that
type if they come from different modules.

Incidentally, to make this visible to name lookup we need to rename the
type to __NSConstantString, since the real NSConstantString is an
Objective-C interface type.  This shouldn't affect anyone outside the
compiler since users of the constant string builtins cast the result
immediately to CFStringRef.

Since this struct type is otherwise implicitly created by the AST
context and cannot access namelookup, we make this a predefined type
and initialize it in Sema.

Note: this issue of builtins that refer to types not visible to name
lookup technically also affects other builtins (e.g. objc_msgSendSuper),
but in all other cases the builtin is a library builtin and the issue
goes away if you include the library that defines the types it uses,
unlike for these constant string builtins.

rdar://problem/24425801

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

8 years ago[cfi] Safe handling of unaddressable vtable pointers (clang).
Evgeniy Stepanov [Wed, 3 Feb 2016 22:18:55 +0000 (22:18 +0000)]
[cfi] Safe handling of unaddressable vtable pointers (clang).

Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
the vtable pointer against the set of all known vtable addresses and
lets the runtime handler know if it is safe to inspect the vtable.

http://reviews.llvm.org/D16823

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

8 years agoRevert r259624 - Make CF constant string decl visible to name lookup to fix module...
Quentin Colombet [Wed, 3 Feb 2016 22:14:53 +0000 (22:14 +0000)]
Revert r259624 - Make CF constant string decl visible to name lookup to fix module errors.

This breaks some internal bots in stage2: clang seg fault.
Looking with Ben to see what is going on.

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

8 years ago[CUDA] added declarations for device-side system calls
Artem Belevich [Wed, 3 Feb 2016 20:53:58 +0000 (20:53 +0000)]
[CUDA] added declarations for device-side system calls

...and std:: wrappers for free/malloc.

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

8 years agoEnsure that we substitute into the declaration of a template parameter pack
Richard Smith [Wed, 3 Feb 2016 20:40:30 +0000 (20:40 +0000)]
Ensure that we substitute into the declaration of a template parameter pack
(that is not a pack expansion) during template argument deduction, even if we
deduced that the pack would be empty.

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

8 years agoRefactor conversion of deduced template arguments to reduce repetition.
Richard Smith [Wed, 3 Feb 2016 20:15:01 +0000 (20:15 +0000)]
Refactor conversion of deduced template arguments to reduce repetition.

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

8 years ago[Sema debugger support] Require non-void types to be complete in unknown-anytype...
Douglas Gregor [Wed, 3 Feb 2016 19:13:08 +0000 (19:13 +0000)]
[Sema debugger support] Require non-void types to be complete in unknown-anytype casts.

When performing a cast from an __unknown_anytype function call to a
non-void type, we need to make sure that type is complete. Fixes
rdar://problem/23959960.

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

8 years agoAdded Anastasia Stulova as a code owner for OpenCL
Anastasia Stulova [Wed, 3 Feb 2016 18:51:19 +0000 (18:51 +0000)]
Added Anastasia Stulova as a code owner for OpenCL

Reviewers: Chris Lattner

Subscribers: cfe-dev

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

8 years agoFix regression from r259622: the operand of an increment that is the operand of
Richard Smith [Wed, 3 Feb 2016 18:48:43 +0000 (18:48 +0000)]
Fix regression from r259622: the operand of an increment that is the operand of
a cast expression is not the operand of a cast expression itself, so if it's
parenthesized we need to form a ParenExpr not a ParenListExpr.

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

8 years agoAdd builtins for bitreverse intrinsic
Matt Arsenault [Wed, 3 Feb 2016 17:49:38 +0000 (17:49 +0000)]
Add builtins for bitreverse intrinsic

Follow the naming convention that bswap uses since it's a
similar sort of operation.

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

8 years agoclang-format: Fix formatting of ternary expressions with comments.
Daniel Jasper [Wed, 3 Feb 2016 17:27:10 +0000 (17:27 +0000)]
clang-format: Fix formatting of ternary expressions with comments.

Before:
  int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
      /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
       ccccccccccccccccccccccccccc;

After:
  int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
      /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
              ccccccccccccccccccccccccccc;

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

8 years agoAdd back the ABITest makefiles
Chris Bieneman [Wed, 3 Feb 2016 17:16:01 +0000 (17:16 +0000)]
Add back the ABITest makefiles

These files are standalone and not integrated with CMake, so we probably want them.

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

8 years ago[OpenMP] Parsing + sema for target parallel for directive.
Arpith Chacko Jacob [Wed, 3 Feb 2016 15:46:42 +0000 (15:46 +0000)]
[OpenMP] Parsing + sema for target parallel for directive.

Summary:
This patch adds parsing + sema for the target parallel for directive along with testcases.

Reviewers: ABataev

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

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

8 years agoMinor cleanup to remove casts and improve some const correctness. NFC.
Aaron Ballman [Wed, 3 Feb 2016 15:20:51 +0000 (15:20 +0000)]
Minor cleanup to remove casts and improve some const correctness. NFC.

Patch by Alexander Riccio.

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

8 years ago[OpenCL] Adding reserved operator logical xor for OpenCL
Anastasia Stulova [Wed, 3 Feb 2016 15:17:14 +0000 (15:17 +0000)]
[OpenCL] Adding reserved operator logical xor for OpenCL

This patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g),
which results in a more meaningful error message.

Patch by Neil Hickey!

Review: http://reviews.llvm.org/D13280

M    test/SemaOpenCL/unsupported.cl
M    include/clang/Basic/TokenKinds.def
M    include/clang/Basic/DiagnosticParseKinds.td
M    lib/Basic/OperatorPrecedence.cpp
M    lib/Lex/Lexer.cpp
M    lib/Parse/ParseExpr.cpp

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

8 years agoProvide match function to look over an entire TU again.
Daniel Jasper [Wed, 3 Feb 2016 14:29:55 +0000 (14:29 +0000)]
Provide match function to look over an entire TU again.

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

8 years agoForgot to remove file in previous commit.
Yury Gribov [Wed, 3 Feb 2016 13:36:31 +0000 (13:36 +0000)]
Forgot to remove file in previous commit.

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

8 years ago[analyzer] AnalysisConsumer: print fully-qualified function name while displaying...
Yury Gribov [Wed, 3 Feb 2016 13:35:33 +0000 (13:35 +0000)]
[analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress

-analyzer-display progress option prints only function names which may be ambiguous. This patch forces AnalysisConsumer to print fully-qualified function names.
Patch by Alex Sidorin!

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

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

8 years ago-inline-asm][X86] Add ability to use AVX512 in MS inline asm
Marina Yatsina [Wed, 3 Feb 2016 11:32:08 +0000 (11:32 +0000)]
-inline-asm][X86] Add ability to use AVX512 in MS inline asm

Defined the new AVX512 registers in clang inline asm.
Fixed a bug in the MC subtarget info creation during the parsing of MS asm statement - now it receives the actual CPU and target features information.

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

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

8 years agoReduce initial Sema memory consumption by 400KB. By Elisavet Sakellari.
Axel Naumann [Wed, 3 Feb 2016 10:45:22 +0000 (10:45 +0000)]
Reduce initial Sema memory consumption by 400KB. By Elisavet Sakellari.

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

8 years agoclang-format: [JS/TypeScript] Support "enum" as an optional property name, too.
Daniel Jasper [Wed, 3 Feb 2016 05:33:44 +0000 (05:33 +0000)]
clang-format: [JS/TypeScript] Support "enum" as an optional property name, too.

Before:
  enum?: string
  [];

After:
  enum?: string[];

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

8 years agoMake CF constant string decl visible to name lookup to fix module errors
Ben Langmuir [Wed, 3 Feb 2016 03:26:19 +0000 (03:26 +0000)]
Make CF constant string decl visible to name lookup to fix module errors

The return type of the __builtin___*StringMakeConstantString functions
is a pointer to a struct, so we need that struct to be visible to name
lookup so that we will correctly merge multiple declarations of that
type if they come from different modules.

Incidentally, to make this visible to name lookup we need to rename the
type to __NSConstantString, since the real NSConstantString is an
Objective-C interface type.  This shouldn't affect anyone outside the
compiler since users of the constant string builtins cast the result
immediately to CFStringRef.

Since this struct type is otherwise implicitly created by the AST
context and cannot access namelookup, we make this a predefined type
and initialize it in Sema.

Note: this issue of builtins that refer to types not visible to name
lookup technically also affects other builtins (e.g. objc_msgSendSuper),
but in all other cases the builtin is a library builtin and the issue
goes away if you include the library that defines the types it uses,
unlike for these constant string builtins.

rdar://problem/24425801

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

8 years agoFix miscompile and rejects-valids when disambiguating after an ambiguous
Richard Smith [Wed, 3 Feb 2016 02:58:20 +0000 (02:58 +0000)]
Fix miscompile and rejects-valids when disambiguating after an ambiguous
C-style-cast to function/array type or parenthesized function-style cast/array
indexing.

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

8 years agoFix typo in OpenCL type mangling. This is still bogus (we should either use the
Richard Smith [Wed, 3 Feb 2016 01:43:59 +0000 (01:43 +0000)]
Fix typo in OpenCL type mangling. This is still bogus (we should either use the
actual source name of the typedef or a vendor mangling) but at least it stands
a chance of demangling now.

We would also benefit from some test coverage of this (OpenCL +
__attribute__((overloadable)) is probably required to reach this).

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

8 years agoFix Itanium RTTI emission so that we emit fundamental type information into the
Richard Smith [Wed, 3 Feb 2016 01:32:42 +0000 (01:32 +0000)]
Fix Itanium RTTI emission so that we emit fundamental type information into the
C++ ABI library for the same set of types for which we expect the C++ ABI
library to provide the RTTI.

Specifically:
 1) __int128 and unsigned __int128 are now emitted into the ABI library. We
    always expected them to be there but never actually made sure to emit them.
 2) Do not expect OpenCL builtin types to have type info in the C++ ABI library.
    Neither libc++abi nor libstdc++ puts them there when built with either GCC
    or Clang.

This matches GCC's behavior.

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

8 years agoPR24989: Stop trying to use the C++11 rules for lambda return type inference in
Richard Smith [Tue, 2 Feb 2016 23:58:56 +0000 (23:58 +0000)]
PR24989: Stop trying to use the C++11 rules for lambda return type inference in
C++14 generic lambdas. It conflicts with the C++14 return type deduction
mechanism, and results in us failing to actually deduce the lambda's return
type in some cases.

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

8 years agoFix rejects-valid when forming a pointer-to-member with 'decltype(expr)::*'.
Richard Smith [Tue, 2 Feb 2016 23:34:49 +0000 (23:34 +0000)]
Fix rejects-valid when forming a pointer-to-member with 'decltype(expr)::*'.

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

8 years agoWork around build failure due to GCC 4.8.1 bug. We don't completely understand
Richard Smith [Tue, 2 Feb 2016 23:11:49 +0000 (23:11 +0000)]
Work around build failure due to GCC 4.8.1 bug. We don't completely understand
the details of the bug, but avoiding overloading llvm::cast with another
function template sidesteps it.

See gcc.gnu.org/PR58022 for details of the bug, and llvm.org/PR26362 for more
backgound on how it manifested in Clang. Patch by Igor Sugak!

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

8 years ago[CUDA] Do not allow dynamic initialization of global device side variables.
Artem Belevich [Tue, 2 Feb 2016 22:29:48 +0000 (22:29 +0000)]
[CUDA] Do not allow dynamic initialization of global device side variables.

In general CUDA does not allow dynamic initialization of
global device-side variables. One exception is that CUDA allows
records with empty constructors as described in section E2.2.1 of
CUDA 7.5 Programming guide.

This patch applies initializer checks for all device-side variables.
Empty constructors are accepted, but no code is generated for them.

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

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

8 years agoObjCXX: fix a crash during typo correction.
Manman Ren [Tue, 2 Feb 2016 22:23:03 +0000 (22:23 +0000)]
ObjCXX: fix a crash during typo correction.

For ObjCXX, we can create a CastExpr with Kind being CK_UserDefinedConversion
and SubExpr being BlockExpr. Specifically one can return BlockExpr from
BuildCXXMemberCallExpr and the result can be used to build a CastExpr.

Fix the assumption in CastExpr::getSubExprAsWritten that SubExpr can only
be CXXMemberCallExpr.

rdar://problem/24364077

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

8 years agoARM: allow both vfma and vfms intrinsics on v7.
Tim Northover [Tue, 2 Feb 2016 18:02:10 +0000 (18:02 +0000)]
ARM: allow both vfma and vfms intrinsics on v7.

The main purpose here is that vfma/vfms should be symmetric, and they are
supported on most v7 cores.

The new ArchGuard is suggested by ACLE but prophylactic for us. Almost all CPUs
with NEON *will* have vfma, and the few exceptions I know of (e.g. Cortex-A8)
are incorrectly modelled by Clang so can't trigger a test.

Fortunately, they're getting rarer. But if we ever do support them properly
arm_neon.h should now do the right thing.

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

8 years agoPR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for-range...
Denis Zobnin [Tue, 2 Feb 2016 17:33:09 +0000 (17:33 +0000)]
PR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for-range expression.

Fix the issue discovered by fuzzing (PR23057, comment 18) by handling nullptr in Sema::ActOnCXXForRangeDecl
and correct delayed typos in for-range expression before calling Sema::ActOnCXXForRangeStmt. Also fixes PR26288.

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

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

8 years agoMake CodeGen headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 16:05:18 +0000 (16:05 +0000)]
Make CodeGen headers self-contained.

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

8 years agoMake the remaining headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 14:24:21 +0000 (14:24 +0000)]
Make the remaining headers self-contained.

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

8 years ago[StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic...
Benjamin Kramer [Tue, 2 Feb 2016 14:24:11 +0000 (14:24 +0000)]
[StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic includes.

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

8 years agoAdd backend dignostic printer for unsupported features
Oliver Stannard [Tue, 2 Feb 2016 13:52:52 +0000 (13:52 +0000)]
Add backend dignostic printer for unsupported features

Re-commit of r258950 after fixing layering violation.

The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

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

8 years agoFix for PR8901: attribute "mode" rejected for enums and dependent types.
Denis Zobnin [Tue, 2 Feb 2016 13:50:39 +0000 (13:50 +0000)]
Fix for PR8901: attribute "mode" rejected for enums and dependent types.

Allow "mode" attribute for enum types, except for vector modes, for compatibility with GCC.
Support "mode" attribute with dependent types.

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

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

8 years agoTest commit (NFC).
Denis Zobnin [Tue, 2 Feb 2016 12:39:08 +0000 (12:39 +0000)]
Test commit (NFC).

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

8 years ago[OpenCL] Eliminate warning when declaring OpenCL builtin functions.
Anastasia Stulova [Tue, 2 Feb 2016 11:29:43 +0000 (11:29 +0000)]
[OpenCL] Eliminate warning when declaring OpenCL builtin functions.

OpenCL builtin functions are usually declared in header files.
Currently clang emits warning for OpenCL builtin functions
which have the same name as standard C library functions.

This commit eliminates such warnings by not adding the C standard
includes following the restriction from OpenCL v1.2 s6.9.f.

Patch by Liu Yaxun (Sam)!

Review: http://reviews.llvm.org/D16692

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

8 years agoMake headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 11:06:57 +0000 (11:06 +0000)]
Make headers self-contained.

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

8 years agoMove DebugInfoKind into its own header to cut the cyclic dependency edge from Driver...
Benjamin Kramer [Tue, 2 Feb 2016 11:06:51 +0000 (11:06 +0000)]
Move DebugInfoKind into its own header to cut the cyclic dependency edge from Driver to Frontend.

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

8 years agoclang-format: Make AlignAfterOpenBracket also affect angle brackets.
Daniel Jasper [Tue, 2 Feb 2016 10:28:11 +0000 (10:28 +0000)]
clang-format: Make AlignAfterOpenBracket also affect angle brackets.

Patch by Matthew Whitehead, thank you.

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

8 years ago[OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.
Alexey Bataev [Tue, 2 Feb 2016 04:59:52 +0000 (04:59 +0000)]
[OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.

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

8 years ago[OpenMP] Prevent nesting of target constructs within target code execution regions.
Arpith Chacko Jacob [Tue, 2 Feb 2016 04:00:47 +0000 (04:00 +0000)]
[OpenMP] Prevent nesting of target constructs within target code execution regions.

Summary:
This patch enhances Sema to check for the following restriction:

OpenMP 4.5 [2.17 Nesting of Regions]
If a target, target update, target data, target enter data, or
target exit data construct is encountered during execution of a
target region, the behavior is unspecified.

Reviewers: ABataev

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

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

8 years ago[asan] Add iOS support for Address Sanitizer
Anna Zaks [Tue, 2 Feb 2016 02:04:48 +0000 (02:04 +0000)]
[asan] Add iOS support for Address Sanitizer

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

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

8 years agoTemplate Type Diffing change
Richard Trieu [Tue, 2 Feb 2016 00:36:59 +0000 (00:36 +0000)]
Template Type Diffing change

When all the arguments of a template are elided, print "A<...>" instead of
"A<[2 * ...]>".  Also remove comment fragment that means nothing.

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

8 years agoAlways build a new TypeSourceInfo for function templates with parameters
Nico Weber [Mon, 1 Feb 2016 22:31:51 +0000 (22:31 +0000)]
Always build a new TypeSourceInfo for function templates with parameters

RecursiveASTVisitor::TraverseFunctionHelper() traverses a function's
ParmVarDecls by going to the function's getTypeSourceInfo if it exists, and
`DEF_TRAVERSE_TYPELOC(FunctionProtoType` then goes to the function's
ParmVarDecls.

For a function template that doesn't have parameters that explicitly depend on
the template parameter, we used to be clever and not build a new
TypeSourceInfo. That meant that when an instantiation of such a template is
visited, its TypeSourceInfo would point to the ParmVarDecls of the template,
not of the instantiation, which then confused clients of RecursiveASTVisitor.

So don't be clever for function templates that have parameters, even if none of
the parameters depend on the type.

Fixes PR26257.
http://reviews.llvm.org/D16478

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

8 years agoUndoing commit r259366 to debug buildbot failure.
Arpith Chacko Jacob [Mon, 1 Feb 2016 22:02:05 +0000 (22:02 +0000)]
Undoing commit r259366 to debug buildbot failure.
> http://reviews.llvm.org/D16758

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

8 years agoCode clean up; NFC.
Aaron Ballman [Mon, 1 Feb 2016 21:28:33 +0000 (21:28 +0000)]
Code clean up; NFC.

Patch by Alexander Riccio.

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

8 years agoFix attribute((mode([word|unwind_word]))) for x32
Reid Kleckner [Mon, 1 Feb 2016 18:58:24 +0000 (18:58 +0000)]
Fix attribute((mode([word|unwind_word]))) for x32

Patch by H.J. Lu

```
typedef unsigned int gcc_word __attribute__((mode(word)));
```
and

```
typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word)));
```
define the largest unsigned integer types which can be stored in a
general purpose register, which may not be the pointer type.  For x32,
they aren't pointer nor unsigned long.  We should

1. Make getUnwindWordWidth and getRegisterWidth virtual,
2. Override them for x32, similar to hasInt128Type.
3. Use getRegisterWidth for __attribute__((mode(word)));

This fixes PR 24706.

Reviewers: rnk

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

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

8 years agodocs: Clarify that cfi-unrelated-cast is based on lifetime.
Peter Collingbourne [Mon, 1 Feb 2016 18:55:50 +0000 (18:55 +0000)]
docs: Clarify that cfi-unrelated-cast is based on lifetime.

Also restore Makefile.sphinx which is needed to build the documentation.

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

8 years agoMove LocInfoType from Sema to AST.
Benjamin Kramer [Mon, 1 Feb 2016 17:42:01 +0000 (17:42 +0000)]
Move LocInfoType from Sema to AST.

While transient and only used during parsing, LocInfoTypes are still used
from ASTDumper and are part of the AST.

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

8 years ago[OpenMP] Prevent nesting of target constructs within target code execution regions.
Arpith Chacko Jacob [Mon, 1 Feb 2016 16:32:47 +0000 (16:32 +0000)]
[OpenMP] Prevent nesting of target constructs within target code execution regions.

Summary:
This patch enhances Sema to check for the following restriction:

OpenMP 4.5 [2.17 Nesting of Regions]
If a target, target update, target data, target enter data, or
target exit data construct is encountered during execution of a
target region, the behavior is unspecified.

Reviewers: ABataev

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

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

8 years agoReapply r259210 with a fix for RegistryTest.cpp.
Aaron Ballman [Mon, 1 Feb 2016 14:11:47 +0000 (14:11 +0000)]
Reapply r259210 with a fix for RegistryTest.cpp.

Patch by Richard Thomson.

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

8 years agoRemove the egregious PCHContainer layering hack that doesn't seem to be necessary...
Benjamin Kramer [Mon, 1 Feb 2016 13:22:39 +0000 (13:22 +0000)]
Remove the egregious PCHContainer layering hack that doesn't seem to be necessary anymore.

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

8 years agoclang-format: Fix incorrect pointer detection in lambdas in constructor
Daniel Jasper [Mon, 1 Feb 2016 11:21:07 +0000 (11:21 +0000)]
clang-format: Fix incorrect pointer detection in lambdas in constructor
initializers.

Before:
  Constructor() : member([](A *a, B * b) {}) {}

After:
  Constructor() : member([](A *a, B *b) {}) {}

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

8 years agoclang-format: Add option to disable string literal formatting.
Daniel Jasper [Mon, 1 Feb 2016 11:21:02 +0000 (11:21 +0000)]
clang-format: Add option to disable string literal formatting.

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

8 years agoclang-format: Fix alignment of trailing multiline columns.
Daniel Jasper [Mon, 1 Feb 2016 11:20:55 +0000 (11:20 +0000)]
clang-format: Fix alignment of trailing multiline columns.

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

8 years agoclang-format: [JS] Treat "in" as a proper operator.
Daniel Jasper [Mon, 1 Feb 2016 11:20:47 +0000 (11:20 +0000)]
clang-format: [JS] Treat "in" as a proper operator.

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

8 years ago[analyzer] Use a wider integer type for an array index.
Artem Dergachev [Mon, 1 Feb 2016 09:29:17 +0000 (09:29 +0000)]
[analyzer] Use a wider integer type for an array index.

Avoids unexpected overflows while performing pointer arithmetics in 64-bit code.
Moreover, neither PointerDiffType nor 'int' can be used as a common array index
type because arrays may have size (and indexes) more than PTRDIFF_MAX but less
than SIZE_MAX.

Patch by Aleksei Sidorin!

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

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

8 years agoMark DR1250 as implemented
David Majnemer [Mon, 1 Feb 2016 01:33:17 +0000 (01:33 +0000)]
Mark DR1250 as implemented

We implemented this DR back in r258768 but forgot to mark it as
implemented.

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

8 years agoReplace usage of llvm::utostr_32 with just llvm::utostr. While this is less efficient...
Craig Topper [Sun, 31 Jan 2016 04:20:03 +0000 (04:20 +0000)]
Replace usage of llvm::utostr_32 with just llvm::utostr. While this is less efficient, its unclear that the one place using the _32 version was doing so for efficiency.

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

8 years ago[Parser] Update CachedTokens while parsing ObjectiveC template argument list
Bruno Cardoso Lopes [Sun, 31 Jan 2016 00:47:51 +0000 (00:47 +0000)]
[Parser] Update CachedTokens while parsing ObjectiveC template argument list

Consider the following ObjC++ snippet:

--
@protocol PA;
@protocol PB;

@class NSArray<ObjectType>;
typedef int some_t;

id<PA> FA(NSArray<id<PB>> *h, some_t group);
--

This would hit an assertion in the parser after generating an annotation token
while trying to update the token cache:

Assertion failed: (CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token")
...
7 clang::Preprocessor::AnnotatePreviousCachedTokens(clang::Token const&) + 494
8 clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) + 1163
9 clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 361
10 clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 598
...

The cached preprocessor token in this case is:

greatergreater '>>' Loc=<testcase.mm:7:24>

while the annotation ("NSArray<id<PB>>") ends at "testcase.mm:7:25", hence the
assertion.

Properly update the CachedTokens during template parsing to contain
two greater tokens instead of a greatergreater.

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

rdar://problem/23494277

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

8 years agoNo need to use utostr when putting integers into a raw_ostream. NFC
Craig Topper [Sun, 31 Jan 2016 00:20:26 +0000 (00:20 +0000)]
No need to use utostr when putting integers into a raw_ostream. NFC

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

8 years agoConvert an unsigned to Twine instead of using utostr since we're already building...
Craig Topper [Sun, 31 Jan 2016 00:20:24 +0000 (00:20 +0000)]
Convert an unsigned to Twine instead of using utostr since we're already building a Twine. NFC

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

8 years ago[AST] Pull simple method inline.
Benjamin Kramer [Sat, 30 Jan 2016 12:16:23 +0000 (12:16 +0000)]
[AST] Pull simple method inline.

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

8 years agoassert(false) -> llvm_unreachable().
Davide Italiano [Sat, 30 Jan 2016 08:03:54 +0000 (08:03 +0000)]
assert(false) -> llvm_unreachable().

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

8 years ago[analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly...
Devin Coughlin [Sat, 30 Jan 2016 01:59:33 +0000 (01:59 +0000)]
[analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly-assume.

This is the default for the analyzer but the flag is added by the driver so
our suppression tests didn't cover this case.

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

8 years ago[SemaCXX] Fix crash-on-invalid while trying to deduce return type of a lambda.
Argyrios Kyrtzidis [Sat, 30 Jan 2016 01:51:20 +0000 (01:51 +0000)]
[SemaCXX] Fix crash-on-invalid while trying to deduce return type of a lambda.

rdar://22032373

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

8 years agoAvoid overly large SmallPtrSet/SmallSet
Matthias Braun [Sat, 30 Jan 2016 01:27:06 +0000 (01:27 +0000)]
Avoid overly large SmallPtrSet/SmallSet

These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

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

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

8 years agoRemove references to autotools build.
Alexey Samsonov [Sat, 30 Jan 2016 00:54:42 +0000 (00:54 +0000)]
Remove references to autotools build.

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

8 years agoThis patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_a...
Ekaterina Romanova [Fri, 29 Jan 2016 23:59:00 +0000 (23:59 +0000)]
This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_aes.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.

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

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

8 years agoImprove -Wconstant-conversion
Richard Trieu [Fri, 29 Jan 2016 23:51:16 +0000 (23:51 +0000)]
Improve -Wconstant-conversion

Switch the evaluation from isIntegerConstantExpr to EvaluateAsInt.
EvaluateAsInt will evaluate more types of expressions than
isIntegerConstantExpr.

Move one case from -Wsign-conversion to -Wconstant-conversion.  The case is:
1) Source and target types are signed
2) Source type is wider than the target type
3) The source constant value is positive
4) The conversion will store the value as negative in the target.

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

8 years agoClass Property: generate metadata for class properties in protocols.
Manman Ren [Fri, 29 Jan 2016 23:46:55 +0000 (23:46 +0000)]
Class Property: generate metadata for class properties in protocols.

The list of class properties is saved in
Old ABI: protocol->ext->class_properties (protocol->ext->size will be updated)
New ABI: protocol->class_properties (protocol->size will be updated)

rdar://23891898

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

8 years agoClass Property: generate metadata for class properties in categories.
Manman Ren [Fri, 29 Jan 2016 23:45:01 +0000 (23:45 +0000)]
Class Property: generate metadata for class properties in categories.

The list of class properties is saved in
Old ABI: category->class_properties (category->size will be updated as well)
New ABI: category->class_properties (a flag in objc_image_info to indicate
         whether or not the list of class properties is present)

rdar://23891898

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

8 years ago[UBSan] Add documentation for runtime issue suppression.
Alexey Samsonov [Fri, 29 Jan 2016 23:07:14 +0000 (23:07 +0000)]
[UBSan] Add documentation for runtime issue suppression.

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