summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Make clang's rewrite engine a core featureAlp Toker2014-07-1610-15033/+0
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-092-0/+5
| | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. llvm-svn: 210498
* [C++11] Use 'nullptr'.Craig Topper2014-05-074-256/+257
| | | | llvm-svn: 208163
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+2
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207795
* do not use "1" for line marker for the predefines "file" eitherLubos Lunak2014-05-011-1/+5
| | | | | | Similar to r207764. llvm-svn: 207794
* do not use "1" for line marker for the main fileLubos Lunak2014-05-011-2/+5
| | | | | | | | | | "1" means entering a new file (from a different one), but the main file is not included from anything (and this would e.g. confuse -Wunused-macros to not report unused macros in the main file, see pr15610, or also see pr18948). The line marker is still useful e.g. if the resulting file is renamed or used via a pipe. llvm-svn: 207764
* revert r207756Lubos Lunak2014-05-011-1/+0
| | | | | | | | There's nothing wrong with the change itself, but test/Frontend/rewrite-includes-messages.c fails without another not-yet-committed fix. llvm-svn: 207762
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2014-05-011-7/+1
| | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. llvm-svn: 207758
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+1
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207756
* Objective-C rewriter. Use _WIN64 instead of __LLP64__Fariborz Jahanian2014-04-161-1/+1
| | | | | | | to conditinalize on 64bit length in a generated meta-data. // rdar://16489050 llvm-svn: 206402
* Objective-C modern translator. Fix declaration ofFariborz Jahanian2014-04-011-0/+4
| | | | | | | __NSConstantStringImpl's length field to accomodate window's 64bit LLP64 mode. // rdar://16489050 llvm-svn: 205353
* [C++11] Replacing FunctionProtoType iterators param_type_begin() and ↵Aaron Ballman2014-03-172-44/+24
| | | | | | param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204045
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-156-53/+47
| | | | | | class. llvm-svn: 203999
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-142-10/+8
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
* [C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-141-3/+1
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203947
* [C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203932
* [C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and ↵Aaron Ballman2014-03-142-24/+8
| | | | | | propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203930
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-8/+3
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-8/+3
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-2/+2
| | | | | | | | 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
* [C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-132-46/+18
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203840
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-132-46/+19
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-132-9/+9
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-132-33/+15
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-095-5/+5
| | | | llvm-svn: 203389
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-082-10/+3
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-2/+1
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-072-3/+3
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-072-23/+14
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* RewriteObjC: Factor string literal creation into a helper and make sure it ↵Benjamin Kramer2014-02-252-85/+36
| | | | | | | | gets a proper constant array type. No change in output. llvm-svn: 202146
* Update for llvm api change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202053
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-11/+0
| | | | | | | | | | | | | | | | | | | 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
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-252-35/+30
| | | | | | | | | | | | | | | 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
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-202-44/+58
| | | | | | | | | | | | | | | | | 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
* Implement MSVC header search algorithm in MicrosoftMode.Will Wilson2013-12-271-1/+1
| | | | | | Follows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx llvm-svn: 198082
* Fix raw lex crash and -frewrite-includes noeol-at-eof failureAlp Toker2013-12-131-5/+5
| | | | | | Raw lexers don't have a preprocessor so we need to null check. llvm-svn: 197245
* [CMake] clang/lib: Prune redundant dependencies.NAKAMURA Takumi2013-12-101-1/+0
| | | | llvm-svn: 196864
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-2/+8
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* Check the initial line number without going through PresumedLocAlp Toker2013-12-051-3/+2
| | | | | | | No practical difference in this case and would return 1 either way, but this is more self-explanatory. llvm-svn: 196511
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-2/+2
| | | | llvm-svn: 196510
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-052-2/+2
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. llvm-svn: 196466
* Add an assert to make it clear we're on the first lineAlp Toker2013-12-051-1/+3
| | | | | | A raw lexer in its initial state is guaranteed to be on line number one. llvm-svn: 196461
* Revert r196372, "do not warn about unknown pragmas in modes that do not ↵NAKAMURA Takumi2013-12-041-1/+7
| | | | | | | | handle them (pr9537)" It broke clang tests on some hosts with +Asserts. Seems "STDC" clashes. llvm-svn: 196376
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2013-12-041-7/+1
| | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. llvm-svn: 196372
* InclusionRewriter: Avoid duplicated BOM checkAlp Toker2013-11-281-7/+3
| | | | | | | The lexer already knows its position in the file, so use that instead of guessing it might be 3. llvm-svn: 195910
* strip UTF-8 BOM in -frewrite-includes (PR#15664)Lubos Lunak2013-11-271-0/+5
| | | | llvm-svn: 195877
* ObjectiveC modern translator. Fixes a translation bugFariborz Jahanian2013-11-221-6/+3
| | | | | | tranalation @protocol expression. // rdar://15517895 llvm-svn: 195480
* Fix typo: inccrementallyBenjamin Kramer2013-10-131-1/+1
| | | | llvm-svn: 192551
* ObjectiveC modern rewriter. Rewrite typedefsFariborz Jahanian2013-10-071-0/+15
| | | | | | | declared locally in ObjectiveC containers. // rdar://15143875 llvm-svn: 192127
OpenPOWER on IntegriCloud