Fariborz Jahanian
287e79a263
Objective-C modern translator. Fix declaration of
...
__NSConstantStringImpl's length field to accomodate
window's 64bit LLP64 mode. // rdar://16489050
llvm-svn: 205353
2014-04-01 19:32:35 +00:00
Aaron Ballman
40bd0aaf68
[C++11] Replacing FunctionProtoType iterators param_type_begin() and param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204045
2014-03-17 15:23:01 +00:00
Craig Topper
fb6b25b5e4
[C++11] Add 'override' keyword to virtual methods that override their base class.
...
llvm-svn: 203999
2014-03-15 04:29:04 +00:00
Aaron Ballman
9371dd2287
[C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203958
2014-03-14 18:34:04 +00:00
Aaron Ballman
535bbcccb1
[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.
...
llvm-svn: 203947
2014-03-14 17:01:24 +00:00
Aaron Ballman
d6d25de46e
[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.
...
llvm-svn: 203932
2014-03-14 15:16:45 +00:00
Aaron Ballman
d85eff49a3
[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.
...
llvm-svn: 203930
2014-03-14 15:02:45 +00:00
Aaron Ballman
19a417699f
[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.
...
llvm-svn: 203922
2014-03-14 12:55:57 +00:00
Aaron Ballman
0f6e64d505
[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.
...
llvm-svn: 203863
2014-03-13 22:58:06 +00:00
Aaron Ballman
a49c5064a1
[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.
llvm-svn: 203842
2014-03-13 20:29:09 +00:00
Aaron Ballman
e8a7dc9889
[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.
...
llvm-svn: 203840
2014-03-13 20:11:06 +00:00
Aaron Ballman
f26acce6f7
[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.
...
llvm-svn: 203839
2014-03-13 19:50:17 +00:00
Aaron Ballman
d174edffa0
Renaming the recently-created (r203830) props() range API to properties() for clarity.
...
llvm-svn: 203835
2014-03-13 19:11:50 +00:00
Aaron Ballman
dc4bea4676
[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.
...
llvm-svn: 203830
2014-03-13 18:47:37 +00:00
Hans Wennborg
501eadb429
Check for LLVM_ON_WIN32 instead of _WIN32.
...
This is a follow-up to r203624 to address Anton's comment.
llvm-svn: 203668
2014-03-12 16:07:46 +00:00
Ahmed Charles
dfca6f97bc
[C++11] Replace OwningPtr include with <memory>.
...
llvm-svn: 203389
2014-03-09 11:36:40 +00:00
Aaron Ballman
e8a8baef44
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203355
2014-03-08 20:12:42 +00:00
Aaron Ballman
23a6dcb365
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203353
2014-03-08 18:45:14 +00:00
Ahmed Charles
b89843299a
Replace OwningPtr with std::unique_ptr.
...
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
2014-03-07 20:03:18 +00:00
Ahmed Charles
d72a5f103d
Replace OwningPtr::isValid() with conversion to bool.
...
This is a precursor to moving to std::unique_ptr.
llvm-svn: 203277
2014-03-07 19:51:06 +00:00
Aaron Ballman
43b68bebe7
[C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203255
2014-03-07 17:50:17 +00:00
NAKAMURA Takumi
9698686505
[CMake] Use LINK_LIBS instead of target_link_libraries().
...
llvm-svn: 202238
2014-02-26 06:41:29 +00:00
Benjamin Kramer
fc18842437
RewriteObjC: Factor string literal creation into a helper and make sure it gets a proper constant array type.
...
No change in output.
llvm-svn: 202146
2014-02-25 12:26:11 +00:00
Rafael Espindola
4fbd373815
Update for llvm api change.
...
llvm-svn: 202053
2014-02-24 18:20:21 +00:00
NAKAMURA Takumi
7da9487dd4
[CMake] Get rid of explicit dependencies to include/clang/*.inc and introduce CLANG_TABLEGEN_TARGETS.
...
This does;
- clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list.
- List of targets is added to LLVM_COMMON_DEPENDS.
- all clang libraries and targets depend on generated headers.
You might wonder this would be regression, but in fact, this is little loss.
- Almost all of clang libraries depend on tblgen'd files and clang-tblgen.
- clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild.
- Each library's dependencies to tblgen'd files might vary along headers' structure.
It made hard to track and update *really optimal* dependencies.
Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS.
llvm-svn: 201842
2014-02-21 07:59:59 +00:00
Alp Toker
314cc81b8c
Rename getResultType() on function and method declarations to getReturnType()
...
A return type is the declared or deduced part of the function type specified in
the declaration.
A result type is the (potentially adjusted) type of the value of an expression
that calls the function.
Rule of thumb:
* Declarations have return types and parameters.
* Expressions have result types and arguments.
llvm-svn: 200082
2014-01-25 16:55:45 +00:00
Alp Toker
9cacbabd33
Rename FunctionProtoType accessors from 'arguments' to 'parameters'
...
Fix a perennial source of confusion in the clang type system: Declarations and
function prototypes have parameters to which arguments are supplied, so calling
these 'arguments' was a stretch even in C mode, let alone C++ where default
arguments, templates and overloading make the distinction important to get
right.
Readability win across the board, especially in the casting, ADL and
overloading implementations which make a lot more sense at a glance now.
Will keep an eye on the builders and update dependent projects shortly.
No functional change.
llvm-svn: 199686
2014-01-20 20:26:09 +00:00
Rafael Espindola
2a008784d3
Use the simpler version of llvm::sys::fs::remove when possible.
...
llvm-svn: 198957
2014-01-10 21:32:14 +00:00
Will Wilson
0fafd34a6e
Implement MSVC header search algorithm in MicrosoftMode.
...
Follows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx
llvm-svn: 198082
2013-12-27 19:46:16 +00:00
Alp Toker
08c2500f9c
Fix raw lex crash and -frewrite-includes noeol-at-eof failure
...
Raw lexers don't have a preprocessor so we need to null check.
llvm-svn: 197245
2013-12-13 17:04:55 +00:00
NAKAMURA Takumi
ebde2aef9f
[CMake] clang/lib: Prune redundant dependencies.
...
llvm-svn: 196864
2013-12-10 02:36:22 +00:00
NAKAMURA Takumi
65d42bcc2b
[CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on target_link_libraries() and LLVM_LINK_COMPONENTS.
...
I will prune redundant dependencies later.
llvm-svn: 196800
2013-12-09 19:04:43 +00:00
Alp Toker
52937abc8b
Check the initial line number without going through PresumedLoc
...
No practical difference in this case and would return 1 either way, but this is
more self-explanatory.
llvm-svn: 196511
2013-12-05 17:28:42 +00:00
Alp Toker
f6a24ce40f
Fix a tranche of comment, test and doc typos
...
llvm-svn: 196510
2013-12-05 16:25:25 +00:00
Alp Toker
d473363876
Correct hyphenations in comments and assert messages
...
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
2013-12-05 04:47:09 +00:00
Alp Toker
f580a3cc05
Add an assert to make it clear we're on the first line
...
A raw lexer in its initial state is guaranteed to be on line number one.
llvm-svn: 196461
2013-12-05 03:41:20 +00:00
NAKAMURA Takumi
ddc867985a
Revert r196372, "do not warn about unknown pragmas in modes that do not handle them (pr9537)"
...
It broke clang tests on some hosts with +Asserts. Seems "STDC" clashes.
llvm-svn: 196376
2013-12-04 11:12:26 +00:00
Lubos Lunak
5c4269c688
do not warn about unknown pragmas in modes that do not handle them (pr9537)
...
And refactor to have just one place in code that sets up the empty
pragma handlers.
llvm-svn: 196372
2013-12-04 10:21:41 +00:00
Alp Toker
d505d40360
Rewriter: Output RewriteRope contents efficiently
...
This avoids allocation of temporary std::strings for file contents, instead
writing chunks directly to the output stream.
The old character-based B-tree iterator remains intact for the time being.
llvm-svn: 196119
2013-12-02 17:02:49 +00:00
Alp Toker
3dfeafd9db
InclusionRewriter: Avoid duplicated BOM check
...
The lexer already knows its position in the file, so use that instead of
guessing it might be 3.
llvm-svn: 195910
2013-11-28 07:21:44 +00:00
Lubos Lunak
c6b9270d04
strip UTF-8 BOM in -frewrite-includes (PR#15664)
...
llvm-svn: 195877
2013-11-27 21:14:43 +00:00
Fariborz Jahanian
d38951acff
ObjectiveC modern translator. Fixes a translation bug
...
tranalation @protocol expression. // rdar://15517895
llvm-svn: 195480
2013-11-22 18:43:41 +00:00
Benjamin Kramer
e28815758e
Fix typo: inccrementally
...
llvm-svn: 192551
2013-10-13 12:02:16 +00:00
Fariborz Jahanian
d29406233b
ObjectiveC modern rewriter. Rewrite typedefs
...
declared locally in ObjectiveC containers.
// rdar://15143875
llvm-svn: 192127
2013-10-07 19:54:22 +00:00
Fariborz Jahanian
0dded8ab04
Revert my patch in r191155 to allow forward
...
class/protocol decls in @implementation and
fixup modern rewriter to handle that.
// rdar://15066233
llvm-svn: 191311
2013-09-24 17:03:07 +00:00
Fariborz Jahanian
ff0c460863
ObjectiveC modern translator: Provide proper cast of
...
the ObjectiveC object of an @synchronized statement.
// rdar://14993814
llvm-svn: 190874
2013-09-17 17:51:48 +00:00
Eli Friedman
9fc443aaed
Address review comment on r189557.
...
We need to escape filenames the same way in InclusionRewriter whether
UseLineDirective is true or false.
Review comment from http://llvm.org/bugs/show_bug.cgi?id=17018#c2
llvm-svn: 190834
2013-09-17 00:51:31 +00:00
Eli Friedman
39996f42cf
Remove unused variable.
...
llvm-svn: 190445
2013-09-10 23:00:03 +00:00
Fariborz Jahanian
b1a2124652
Modern ObjectiveC translator. Fix translation of
...
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation
of such expressions. // rdar://14932320
llvm-svn: 190341
2013-09-09 19:59:59 +00:00
Benjamin Kramer
60509af49a
Fix constructor-related typos.
...
Noticed by Roman Divacky.
llvm-svn: 190311
2013-09-09 14:48:42 +00:00