]> granicus.if.org Git - clang/log
clang
10 years ago[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range...
Aaron Ballman [Fri, 14 Mar 2014 17:01:24 +0000 (17:01 +0000)]
[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoRemoving some more unused iterator methods for partial specializations.
Aaron Ballman [Fri, 14 Mar 2014 16:32:36 +0000 (16:32 +0000)]
Removing some more unused iterator methods for partial specializations.

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

10 years agoclang/test/CodeGen/aarch64-varargs.c: works now regardless of assertions.
Christian Pirker [Fri, 14 Mar 2014 16:30:06 +0000 (16:30 +0000)]
clang/test/CodeGen/aarch64-varargs.c: works now regardless of assertions.

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

10 years ago[C++11] Replacing VarTemplateDecl iterators spec_begin() and spec_end() with iterator...
Aaron Ballman [Fri, 14 Mar 2014 16:29:14 +0000 (16:29 +0000)]
[C++11] Replacing VarTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoRemoving some unused iterator methods for partial specializations.
Aaron Ballman [Fri, 14 Mar 2014 16:19:04 +0000 (16:19 +0000)]
Removing some unused iterator methods for partial specializations.

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

10 years ago[C++11] Replacing ClassTemplateDecl iterators spec_begin() and spec_end() with iterat...
Aaron Ballman [Fri, 14 Mar 2014 16:13:33 +0000 (16:13 +0000)]
[C++11] Replacing ClassTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing FunctionTemplateDecl iterators spec_begin() and spec_end() with...
Aaron Ballman [Fri, 14 Mar 2014 16:05:56 +0000 (16:05 +0000)]
[C++11] Replacing FunctionTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators varlist_begin() and...
Aaron Ballman [Fri, 14 Mar 2014 15:55:35 +0000 (15:55 +0000)]
[C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoObjective-C++ IRGen. Due to change to AST for initialization of c++11’s
Fariborz Jahanian [Fri, 14 Mar 2014 15:40:54 +0000 (15:40 +0000)]
Objective-C++ IRGen. Due to change to AST for initialization of c++11’s
data members by addition of CXXDefaultInitExpr node to the initializer expression,
it has broken treatment of arc code for such initializations. Reviewed by John McCall.
// rdar://16299964

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

10 years ago[C++11] Replacing DeclContext iterators lookups_begin() and lookups_end() with iterat...
Aaron Ballman [Fri, 14 Mar 2014 15:28:49 +0000 (15:28 +0000)]
[C++11] Replacing DeclContext iterators lookups_begin() and lookups_end() with iterator_range lookups(). Similar for noload_lookups(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ivar_end() with...
Aaron Ballman [Fri, 14 Mar 2014 15:16:45 +0000 (15:16 +0000)]
[C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and propimpl_end()...
Aaron Ballman [Fri, 14 Mar 2014 15:02:45 +0000 (15:02 +0000)]
[C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoDon't verify module inclusions in assembler files.
Daniel Jasper [Fri, 14 Mar 2014 14:53:17 +0000 (14:53 +0000)]
Don't verify module inclusions in assembler files.

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

10 years ago[C++11] Replacing ObjCCategoryDecl iterators ivar_begin() and ivar_end() with iterato...
Aaron Ballman [Fri, 14 Mar 2014 13:13:27 +0000 (13:13 +0000)]
[C++11] Replacing ObjCCategoryDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCCategoryDecl iterators protocol_loc_begin() and protocol_loc_en...
Aaron Ballman [Fri, 14 Mar 2014 13:03:32 +0000 (13:03 +0000)]
[C++11] Replacing ObjCCategoryDecl iterators protocol_loc_begin() and protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and protocol_end()...
Aaron Ballman [Fri, 14 Mar 2014 12:55:57 +0000 (12:55 +0000)]
[C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoclang/test/CodeGen/aarch64-varargs.c: Suppress this for -Asserts, for now.
NAKAMURA Takumi [Fri, 14 Mar 2014 12:42:41 +0000 (12:42 +0000)]
clang/test/CodeGen/aarch64-varargs.c: Suppress this for -Asserts, for now.

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

10 years ago[C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and protocol_loc_en...
Aaron Ballman [Fri, 14 Mar 2014 12:38:50 +0000 (12:38 +0000)]
[C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoAArch64_be specific clang target settings
Christian Pirker [Fri, 14 Mar 2014 12:15:45 +0000 (12:15 +0000)]
AArch64_be specific clang target settings

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

10 years agoAArch64_be varargs processing for ARM ABI
Christian Pirker [Fri, 14 Mar 2014 11:51:06 +0000 (11:51 +0000)]
AArch64_be varargs processing for ARM ABI

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

10 years agoRemove unused typedef as pointed out by a GCC warning.
Benjamin Kramer [Fri, 14 Mar 2014 10:15:44 +0000 (10:15 +0000)]
Remove unused typedef as pointed out by a GCC warning.

Yay for auto.

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

10 years agoUse the correct symbol for a left bracket.
Bill Wendling [Fri, 14 Mar 2014 08:39:06 +0000 (08:39 +0000)]
Use the correct symbol for a left bracket.

PR19089

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

10 years agoDe-virtualize a method that doesn't override anything and has no overrides itself.
Craig Topper [Fri, 14 Mar 2014 06:06:19 +0000 (06:06 +0000)]
De-virtualize a method that doesn't override anything and has no overrides itself.

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

10 years agoRemove seemingly dead method. It was marked virtual but doesn't override anything...
Craig Topper [Fri, 14 Mar 2014 06:04:02 +0000 (06:04 +0000)]
Remove seemingly dead method. It was marked virtual but doesn't override anything and there don't seem to be any in tree callers.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Fri, 14 Mar 2014 06:02:07 +0000 (06:02 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agostatic link polly
Sebastian Pop [Fri, 14 Mar 2014 04:04:27 +0000 (04:04 +0000)]
static link polly

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

10 years ago[Modules] Emit the module file paths as dependencies of the PCH when we are building...
Argyrios Kyrtzidis [Fri, 14 Mar 2014 03:07:38 +0000 (03:07 +0000)]
[Modules] Emit the module file paths as dependencies of the PCH when we are building one.

This is because the PCH is tied to the module files, if one of the module files changes or gets removed
the build system should re-build the PCH file.

rdar://16321245

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

10 years ago[Modules] Make sure that the synthesized file "__inferred_module.map" doesn't show...
Argyrios Kyrtzidis [Fri, 14 Mar 2014 02:26:31 +0000 (02:26 +0000)]
[Modules] Make sure that the synthesized file "__inferred_module.map" doesn't show up as dependency of a module file.

Follow-up for rdar://15459210

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

10 years agoRefactor ASTReader::readInputFileInfo to return a struct containing the related infor...
Argyrios Kyrtzidis [Fri, 14 Mar 2014 02:26:27 +0000 (02:26 +0000)]
Refactor ASTReader::readInputFileInfo to return a struct containing the related information.

No functionality change.

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

10 years ago[C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end()...
Aaron Ballman [Thu, 13 Mar 2014 22:58:06 +0000 (22:58 +0000)]
[C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators known_extensions_begin() and known_exte...
Aaron Ballman [Thu, 13 Mar 2014 21:57:01 +0000 (21:57 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators known_extensions_begin() and known_extensions_end() with iterator_range known_extensions(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators visible_extensions_begin() and visible_...
Aaron Ballman [Thu, 13 Mar 2014 21:47:07 +0000 (21:47 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators visible_extensions_begin() and visible_extensions_end() with iterator_range visible_extensions(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators known_categories_begin() and known_cate...
Aaron Ballman [Thu, 13 Mar 2014 21:35:02 +0000 (21:35 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators known_categories_begin() and known_categories_end() with iterator_range known_categories(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators visible_categories_begin() and visible_...
Aaron Ballman [Thu, 13 Mar 2014 21:23:55 +0000 (21:23 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators visible_categories_begin() and visible_categories_end() with iterator_range visible_categories(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators ivar_begin() and ivar_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 21:09:43 +0000 (21:09 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators all_referenced_protocol_begin() and...
Aaron Ballman [Thu, 13 Mar 2014 20:55:22 +0000 (20:55 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators protocol_loc_begin() and protocol_loc_e...
Aaron Ballman [Thu, 13 Mar 2014 20:34:24 +0000 (20:34 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators protocol_loc_begin() and protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoRefactor InstantiatingTemplate constructors
Stephan Tolksdorf [Thu, 13 Mar 2014 20:34:22 +0000 (20:34 +0000)]
Refactor InstantiatingTemplate constructors

This patch factors the bodies of 9 constructors out into a single initialization
method.

Reviewed By: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D3059

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

10 years agoAdd SourceRange to err_not_tag_in_scope diagnostic in TreeTransform<...>::RebuildDepe...
Stephan Tolksdorf [Thu, 13 Mar 2014 20:34:03 +0000 (20:34 +0000)]
Add SourceRange to err_not_tag_in_scope diagnostic in TreeTransform<...>::RebuildDependentNameType

Apparently the FIXME was overlooked when the source location information was
made available to the function.

Reviewed By: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D3058

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

10 years ago[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end(...
Aaron Ballman [Thu, 13 Mar 2014 20:29:09 +0000 (20:29 +0000)]
[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.

Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases.

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

10 years ago[C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and classmeth_end...
Aaron Ballman [Thu, 13 Mar 2014 20:11:06 +0000 (20:11 +0000)]
[C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and instmeth_end(...
Aaron Ballman [Thu, 13 Mar 2014 19:50:17 +0000 (19:50 +0000)]
[C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoCodeGen: use symbolic enumerators for memory order
Tim Northover [Thu, 13 Mar 2014 19:25:52 +0000 (19:25 +0000)]
CodeGen: use symbolic enumerators for memory order

It makes the code clearer and less error-prone to use our (already
known) special values for the various memory order cases.

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

10 years agoCodeGen: make use of weaker failure orders on cmpxchg.
Tim Northover [Thu, 13 Mar 2014 19:25:48 +0000 (19:25 +0000)]
CodeGen: make use of weaker failure orders on cmpxchg.

This makes Clang take advantage of the recent IR addition of a
"failure" memory ordering requirement. As with the "success" ordering,
we try to emit just a single version if the expression is constant,
but fall back to runtime detection (to allow optimisation across
function-call boundaries).

rdar://problem/15996804

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

10 years agoRenaming the recently-created (r203830) props() range API to properties() for clarity.
Aaron Ballman [Thu, 13 Mar 2014 19:11:50 +0000 (19:11 +0000)]
Renaming the recently-created (r203830) props() range API to properties() for clarity.

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

10 years ago[C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 19:03:34 +0000 (19:03 +0000)]
[C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 18:47:37 +0000 (18:47 +0000)]
[C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() with iterator_range props(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing UsingDecl iterators shadow_begin() and shadow_end() with iterator_r...
Aaron Ballman [Thu, 13 Mar 2014 18:07:29 +0000 (18:07 +0000)]
[C++11] Replacing UsingDecl iterators shadow_begin() and shadow_end() with iterator_range shadows(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[analyzer] Warn when passing pointers to const but uninitialized memory.
Jordan Rose [Thu, 13 Mar 2014 17:55:39 +0000 (17:55 +0000)]
[analyzer] Warn when passing pointers to const but uninitialized memory.

Passing a pointer to an uninitialized memory buffer is normally okay,
but if the function is declared to take a pointer-to-const then it's
very unlikely it will be modifying the buffer. In this case the analyzer
should warn that there will likely be a read of uninitialized memory.

This doesn't check all elements of an array, only the first one.
It also doesn't yet check Objective-C methods, only C functions and
C++ methods.

This is controlled by a new check: alpha.core.CallAndMessageUnInitRefArg.

Patch by Per Viberg!

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

10 years ago[C++11] Replacing ObjCImplementationDecl iterators init_begin() and init_end() with...
Aaron Ballman [Thu, 13 Mar 2014 17:35:02 +0000 (17:35 +0000)]
[C++11] Replacing ObjCImplementationDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with iterator_r...
Aaron Ballman [Thu, 13 Mar 2014 17:34:31 +0000 (17:34 +0000)]
[C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators capture_begin() and capture_end() with...
Aaron Ballman [Thu, 13 Mar 2014 17:08:33 +0000 (17:08 +0000)]
[C++11] Replacing CXXRecordDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoMS intrinsics: __interlockedbittestandset(64) (PR19054)
Hans Wennborg [Thu, 13 Mar 2014 17:05:09 +0000 (17:05 +0000)]
MS intrinsics: __interlockedbittestandset(64) (PR19054)

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

10 years ago[C++11] Replacing CXXRecordDecl iterators friend_begin() and friend_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 17:00:06 +0000 (17:00 +0000)]
[C++11] Replacing CXXRecordDecl iterators friend_begin() and friend_end() with iterator_range friends(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators ctor_begin() and ctor_end() with iterator_r...
Aaron Ballman [Thu, 13 Mar 2014 16:51:27 +0000 (16:51 +0000)]
[C++11] Replacing CXXRecordDecl iterators ctor_begin() and ctor_end() with iterator_range ctors(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoPrevent outputting HeaderFileInfos for files not used as headers
Ben Langmuir [Thu, 13 Mar 2014 16:46:36 +0000 (16:46 +0000)]
Prevent outputting HeaderFileInfos for files not used as headers

When building an AST file, we don't want to output HeaderFileInfo
structures for files that are not actually used as headers in the
current context.  This can lead to assuming that unrelated files have
include counts of 0, defeating multiple-include prevention.

This is accomplished by adding an IsValid bit to the HFI.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators method_begin() and method_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 16:36:16 +0000 (16:36 +0000)]
[C++11] Replacing CXXRecordDecl iterators method_begin() and method_end() with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() with iterat...
Aaron Ballman [Thu, 13 Mar 2014 16:15:17 +0000 (16:15 +0000)]
[C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoRemoving some methods which appear to be unused (at least in clang, lld and lldb).
Aaron Ballman [Thu, 13 Mar 2014 15:47:51 +0000 (15:47 +0000)]
Removing some methods which appear to be unused (at least in clang, lld and lldb).

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

10 years agoSimplify code. No functionality change.
Rafael Espindola [Thu, 13 Mar 2014 15:47:50 +0000 (15:47 +0000)]
Simplify code. No functionality change.

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

10 years ago[C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator...
Aaron Ballman [Thu, 13 Mar 2014 15:41:46 +0000 (15:41 +0000)]
[C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops.

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

10 years agoCMake: allow generation of a Qt Compressed Help file for Clang source
Dmitri Gribenko [Thu, 13 Mar 2014 14:17:01 +0000 (14:17 +0000)]
CMake: allow generation of a Qt Compressed Help file for Clang source

r203272 enables generation of a Qt Compressed Help file for the LLVM source
code.

As a consequence, this change brings the same capabilities to Clang while
reusing these two variables:

  LLVM_ENABLE_DOXYGEN_QT_HELP
  LLVM_DOXYGEN_QHELPGENERATOR_PATH

and adding

  CLANG_DOXYGEN_QCH_FILENAME="org.llvm.clang.qch"
  CLANG_DOXYGEN_QHP_NAMESPACE="org.llvm.clang"
  CLANG_DOXYGEN_QHP_CUST_FILTER_NAME="Clang ${CLANG_VERSION}"
  CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS="Clang,${CLANG_VERSION}"

Patch by Konrad Kleine.

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

10 years agoRemove an unnecessary check for FormatTok not being null.
Alexander Kornienko [Thu, 13 Mar 2014 13:59:48 +0000 (13:59 +0000)]
Remove an unnecessary check for FormatTok not being null.

Summary:
This check hints clang analyzer, that FormatTok may be null, and it
reports a null pointer dereference error:
http://buildd-clang.debian.net/scan-build/report-827c64.html#Path28

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3040

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

10 years agoclang-format: Prevent ObjC code from confusing the braced-init detection
Daniel Jasper [Thu, 13 Mar 2014 10:11:17 +0000 (10:11 +0000)]
clang-format: Prevent ObjC code from confusing the braced-init detection

This was leading to bad formatting, e.g.:
Before:
  f(^{
      @autoreleasepool {
        if (a) {
          g();
  }
  }
  });

After:
  f(^{
      @autoreleasepool {
        if (a) {
          g();
        }
      }
  });

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

10 years agoTests for DR389-399.
Richard Smith [Thu, 13 Mar 2014 08:40:37 +0000 (08:40 +0000)]
Tests for DR389-399.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Thu, 13 Mar 2014 08:12:15 +0000 (08:12 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoDe-virtualize a method. It's called through template magic and doesn't override anything.
Craig Topper [Thu, 13 Mar 2014 07:14:47 +0000 (07:14 +0000)]
De-virtualize a method. It's called through template magic and doesn't override anything.

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

10 years agoRemove unreachable PragmaCaptured method. It's not a real PPCallback.
Craig Topper [Thu, 13 Mar 2014 06:19:24 +0000 (06:19 +0000)]
Remove unreachable PragmaCaptured method. It's not a real PPCallback.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Thu, 13 Mar 2014 06:07:04 +0000 (06:07 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Thu, 13 Mar 2014 02:13:41 +0000 (02:13 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoAlways use --eh-frame-hdr on NetBSD, even for -static.
Joerg Sonnenberger [Thu, 13 Mar 2014 00:42:01 +0000 (00:42 +0000)]
Always use --eh-frame-hdr on NetBSD, even for -static.

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

10 years agoPR18275: If a member function of a class template is declared with a
Richard Smith [Thu, 13 Mar 2014 00:28:45 +0000 (00:28 +0000)]
PR18275: If a member function of a class template is declared with a
const-qualified parameter type and the defined with a non-const-qualified
parameter type, the parameter is not const inside its body. Ensure that
the type we use when instantiating the body is the right one. Patch by
suyog sarda!

This is still rather unsatisfactory; it seems like it might be better to
instantiate at least the function parameters, and maybe the complete function
declaration, when we instantiate the definition for such a member function
(instead of reusing the declaration from inside the instantiated class
definition).

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

10 years agoOnly allow streaming exactly type 'bool' to a DiagnosticBuilder, not anything
Richard Smith [Wed, 12 Mar 2014 23:36:42 +0000 (23:36 +0000)]
Only allow streaming exactly type 'bool' to a DiagnosticBuilder, not anything
that implicitly converts to 'bool' (such as pointers, and the first operand of
?:). Clean up issues found by this. Patch by Stephan Tolksdorf!

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

10 years agoFix crash if delayed template parsing meets an erroneous trailing return type.
Richard Smith [Wed, 12 Mar 2014 23:14:33 +0000 (23:14 +0000)]
Fix crash if delayed template parsing meets an erroneous trailing return type.
Based on a patch and test by Stephan Tolksdorf! Refactoring and fixing adjacent
brokenness by me.

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

10 years agoMS intrinsics: implement the __movs and __stos intrinsics (PR19054)
Hans Wennborg [Wed, 12 Mar 2014 22:00:32 +0000 (22:00 +0000)]
MS intrinsics: implement the __movs and __stos intrinsics (PR19054)

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

10 years agoThread Safety Analysis: new test case for lambdas
DeLesley Hutchins [Wed, 12 Mar 2014 21:33:47 +0000 (21:33 +0000)]
Thread Safety Analysis: new test case for lambdas

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

10 years agoMS intrinsics: implement __readgs{byte,word,dword,qword} (PR19054)
Hans Wennborg [Wed, 12 Mar 2014 21:09:05 +0000 (21:09 +0000)]
MS intrinsics: implement __readgs{byte,word,dword,qword} (PR19054)

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

10 years agoMS intrinsics: don't declare __readeflags and __writeeflags in Intrin.h
Hans Wennborg [Wed, 12 Mar 2014 21:09:03 +0000 (21:09 +0000)]
MS intrinsics: don't declare __readeflags and __writeeflags in Intrin.h

They're already defined in ia32intrin.h, and this would cause including Intrin.h
in 64-bit mode to fail because of conflicting types. Update ms-intrin.cpp to
also run in 64-bit mode to catch things like this.

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

10 years agoRevert "CodeGen: Use a binary format for instrumentation based profiling"
Justin Bogner [Wed, 12 Mar 2014 21:06:31 +0000 (21:06 +0000)]
Revert "CodeGen: Use a binary format for instrumentation based profiling"

I've clearly done something wrong with how to get this to link
correctly. Reverting for now.

This reverts commit r203711.

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

10 years agoCodeGen: Use a binary format for instrumentation based profiling
Justin Bogner [Wed, 12 Mar 2014 20:53:16 +0000 (20:53 +0000)]
CodeGen: Use a binary format for instrumentation based profiling

This updates CodeGenPGO to use the ProfileDataReader introduced to
llvm in r203703 and the new API for writing out the profile introduced
to compiler-rt in r203710.

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

10 years agoDont unconditionally add gcc4.2 include paths on FreeBSD.
Roman Divacky [Wed, 12 Mar 2014 19:32:42 +0000 (19:32 +0000)]
Dont unconditionally add gcc4.2 include paths on FreeBSD.

Newer FreeBSD doesnt ship with gcc and defaults to using libc++.

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

10 years agoObjective-C. Issue diagnostics on mismatched methods when their selector is used
Fariborz Jahanian [Wed, 12 Mar 2014 18:34:01 +0000 (18:34 +0000)]
Objective-C. Issue diagnostics on mismatched methods when their selector is used
in an @selector expression. // rdar://15794055

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

10 years agoPR19113: Emit 'vtable' TBAA metadata when loading a vptr in a pointer-to-member-funct...
Richard Smith [Wed, 12 Mar 2014 18:26:14 +0000 (18:26 +0000)]
PR19113: Emit 'vtable' TBAA metadata when loading a vptr in a pointer-to-member-function call.

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

10 years agoCodeGen: Move hot/cold logic out of PGOProfileData
Justin Bogner [Wed, 12 Mar 2014 18:14:32 +0000 (18:14 +0000)]
CodeGen: Move hot/cold logic out of PGOProfileData

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

10 years agoDR1346: a parenthesized braced-init-list cannot be used as the initializer when
Richard Smith [Wed, 12 Mar 2014 17:42:45 +0000 (17:42 +0000)]
DR1346: a parenthesized braced-init-list cannot be used as the initializer when
performing auto type deduction.

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

10 years agoDon't recompute inlining threshold - use new overload provided by LLVM
Eli Bendersky [Wed, 12 Mar 2014 16:30:34 +0000 (16:30 +0000)]
Don't recompute inlining threshold - use new overload provided by LLVM

Follow-up on LLVM r203669

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

10 years agoCheck for LLVM_ON_WIN32 instead of _WIN32.
Hans Wennborg [Wed, 12 Mar 2014 16:07:46 +0000 (16:07 +0000)]
Check for LLVM_ON_WIN32 instead of _WIN32.

This is a follow-up to r203624 to address Anton's comment.

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

10 years agoUse vector<T>::data() to simplify code
Dmitri Gribenko [Wed, 12 Mar 2014 15:35:53 +0000 (15:35 +0000)]
Use vector<T>::data() to simplify code

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

10 years agoARM: Correct alignment of structs passed as byval pointer
Oliver Stannard [Wed, 12 Mar 2014 14:02:50 +0000 (14:02 +0000)]
ARM: Correct alignment of structs passed as byval pointer

When a struct has bitfields overlapping with other members
(as required by the AAPCS), clang uses a packed struct to
represent this. If such a struct is large enough for clang to
pass it as a byval pointer (>64 bytes), we need to set the
alignment of the argument to match the original type.

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

10 years agoclang-format: Fix crasher.
Daniel Jasper [Wed, 12 Mar 2014 08:24:47 +0000 (08:24 +0000)]
clang-format: Fix crasher.

Caused by unknown tokens (e.g. "\n") not properly updating the state.

Example:
  const char* c = STRINGIFY(
  \na : b);

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 12 Mar 2014 06:41:41 +0000 (06:41 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoDisable cross-windows-on-linux.cpp for now. It may or may not fail. :/
NAKAMURA Takumi [Wed, 12 Mar 2014 06:16:26 +0000 (06:16 +0000)]
Disable cross-windows-on-linux.cpp for now. It may or may not fail. :/

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 12 Mar 2014 05:09:18 +0000 (05:09 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 12 Mar 2014 04:55:44 +0000 (04:55 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoLexer: split test into separate files
Saleem Abdulrasool [Wed, 12 Mar 2014 02:53:12 +0000 (02:53 +0000)]
Lexer: split test into separate files

Unfortunately, XFAIL applies to the entire file.  Split the test into two
different units, enabling the proper application of XFAIL on the test which is
expected to fail on Windows.

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

10 years agoLex: reduce buffer size, add a test
Saleem Abdulrasool [Wed, 12 Mar 2014 02:26:08 +0000 (02:26 +0000)]
Lex: reduce buffer size, add a test

Reduce the stack usage as hopefully include paths are usually not too long.  Add
a test case for the path normalisation behaviour.

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

10 years agoAdd an option -fmodules-validate-system-headers
Ben Langmuir [Wed, 12 Mar 2014 00:06:17 +0000 (00:06 +0000)]
Add an option -fmodules-validate-system-headers

When enabled, always validate the system headers when loading a module.
The end result of this is that when these headers change, we will notice
and rebuild the module.

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

10 years agoAllow GNU-style attributes on lambda expressions.
Aaron Ballman [Wed, 12 Mar 2014 00:01:07 +0000 (00:01 +0000)]
Allow GNU-style attributes on lambda expressions.

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

10 years agoDebugInfo: Remove debug-info-pubtypes.ccp - pubnames/pubtypes are adequately tested...
David Blaikie [Tue, 11 Mar 2014 23:42:49 +0000 (23:42 +0000)]
DebugInfo: Remove debug-info-pubtypes.ccp - pubnames/pubtypes are adequately tested in LLVM now.

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

10 years agoBe case sensitive when determining driver mode based on argv[0] except on Windows
Hans Wennborg [Tue, 11 Mar 2014 23:42:29 +0000 (23:42 +0000)]
Be case sensitive when determining driver mode based on argv[0] except on Windows

This narrows the impact of r188833 after Dimitry pointed out that it's good to be
able to tell the difference between 'cc' and 'CC'.

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