summaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C. Under a special flag, -Wcstring-format-directive,Fariborz Jahanian2014-09-091-0/+27
| | | | | | | | | off by default, issue a warning if %s directive is used in certain CF/NS formatting APIs, to assist user in deprecating use of such %s in these APIs. rdar://18182443 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217467 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-221-0/+1
| | | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216271 91177308-0d34-0410-b5e6-96231b3b80d8
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-101-1/+3
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208470 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'.Craig Topper2014-05-081-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208280 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in r204164 that made *all* keywords available in OpenCL mode.Richard Smith2014-03-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204196 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating a printing policy for "half":Yunzhong Gao2014-03-181-0/+2
| | | | | | | | | | | | | | Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for other languages, error messages and metadata (and hence debug info) should refer to the half-precision floating point as "__fp16" instead of "half" when compiling for non-OpenCL languages. This patch creates a new printing policy for half in a similar manner to what is done for bool and wchar_t. Differential Revision: http://llvm-reviews.chandlerc.com/D2952 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204164 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-111-1/+1
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203537 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename language option MicrosoftMode to MSVCCompatAlp Toker2014-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There's been long-standing confusion over the role of these two options. This commit makes the necessary changes to differentiate them clearly, following up from r198936. MicrosoftExt (aka. fms-extensions): Enable largely unobjectionable Microsoft language extensions to ease portability. This mode, also supported by gcc, is used for building software like FreeBSD and Linux kernel extensions that share code with Windows drivers. MSVCCompat (aka. -fms-compatibility, formerly MicrosoftMode): Turn on a special mode supporting 'heinous' extensions for drop-in compatibility with the Microsoft Visual C++ product. Standards-compilant C and C++ code isn't guaranteed to work in this mode. Implies MicrosoftExt. Note that full -fms-compatibility mode is currently enabled by default on the Windows target, which may need tuning to serve as a reasonable default. See cfe-commits for the full discourse, thread 'r198497 - Move MS predefined type_info out of InitializePredefinedMacros' No change in behaviour. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199209 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198686 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a FIXME; created a print method for Selectors that accepts a ↵Aaron Ballman2014-01-031-0/+4
| | | | | | | | raw_ostream, and started using it in places it made sense. No functional changes intended, just API cleanliness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198428 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: For 'default' and 'shared' family ofFariborz Jahanian2013-10-101-3/+3
| | | | | | | | methods, infer their self's type as their result type. // rdar://15145218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192377 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: A typical implementation ofFariborz Jahanian2013-10-071-1/+0
| | | | | | | | | 'default' methods in Foundation does not infer 'instancetype' for methods' result type. // rdar://15145218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192129 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: For consistency, also inferFariborz Jahanian2013-09-181-0/+2
| | | | | | | | | 'instancetype' for known family of methods with related result type; such as 'init' methods. // rdar://14987948 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190956 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: remove dead code.Fariborz Jahanian2013-08-291-9/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189592 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: Add another family of factory Fariborz Jahanian2013-08-021-0/+5
| | | | | | | methods which can be migrated to instancetype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187672 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator: Fixes public buildbot failures,Fariborz Jahanian2013-08-021-8/+0
| | | | | | | in my previous patch which was reverted in r187657 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187661 91177308-0d34-0410-b5e6-96231b3b80d8
* revert patch I added in r187655. It still breaks publicFariborz Jahanian2013-08-021-0/+8
| | | | | | | buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187657 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migration. Check-in patch reverted in r187634.Fariborz Jahanian2013-08-021-8/+0
| | | | | | | Also removed check for "NS" prefix for class name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187655 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods ↵Rafael Espindola2013-08-021-0/+8
| | | | | | | | | | with certain prefix selector matching their class names' suffix." This reverts commit r187626. It is breaking the bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187634 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC migrator. Migrate to instancetype return typeFariborz Jahanian2013-08-011-8/+0
| | | | | | | | for mehods with certain prefix selector matching their class names' suffix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187626 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C migrator: some cleanup.Fariborz Jahanian2013-07-241-0/+3
| | | | | | | | | Expose static type of init/alloc/retain with instance type as well. Ad-hoc cases are coming next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187068 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjC migrator: more knobs toward doingFariborz Jahanian2013-07-231-1/+1
| | | | | | | instancetype migration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187000 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjC migrator: Define family of methodsFariborz Jahanian2013-07-231-0/+33
| | | | | | | | which are candidate for migrating to 'instancetype'. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186981 91177308-0d34-0410-b5e6-96231b3b80d8
* cleanup (address some more review comments for r183474):Adrian Prantl2013-06-101-6/+6
| | | | | | | | - reduce default buffer size to 64, which will still be large enough to hold any property names found in the wild. - get rid of the /*static*/ comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183697 91177308-0d34-0410-b5e6-96231b3b80d8
* address some comments on r183474:Adrian Prantl2013-06-071-10/+14
| | | | | | | | | | - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183582 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Use global index to improve typo correction performanceArgyrios Kyrtzidis2013-04-171-1/+1
| | | | | | | | | Typo correction for an unqualified name needs to walk through all of the identifier tables of all modules. When we have a global index, just walk its identifier table only. rdar://13425732 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179730 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some stray uses of <ctype.h> functions.Jordan Rose2013-02-091-1/+1
| | | | | | These are causing assertions on some MSVC builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174805 91177308-0d34-0410-b5e6-96231b3b80d8
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-4/+3
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
* s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith2013-01-021-3/+3
| | | | | | nearby 'C++0x' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-111-1/+1
| | | | | | | latter is rather a mess to type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169919 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-2/+2
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded includes from IdentifierTableNico Weber2012-11-111-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167694 91177308-0d34-0410-b5e6-96231b3b80d8
* Macro history (de-)serialization. Deserialization currently reads only the ↵Alexander Kornienko2012-09-251-0/+1
| | | | | | | | | | | | | | | | latest macro definition. Needs more work. Summary: Passes all tests (+ the new one with code completion), but needs a thorough review in part related to modules. Reviewers: doug.gregor Reviewed By: alexfh CC: cfe-commits, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D41 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164610 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow disabling of wchar_t type.Abramo Bagnara2012-09-051-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163221 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing cctype includes.Joerg Sonnenberger2012-08-101-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161660 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the way KEYNOMS is defined to be more comprehensible. Francois Pichet2012-07-241-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160663 91177308-0d34-0410-b5e6-96231b3b80d8
* char16_t and char32_t are defined via typedef in MSVC 11 RC. So introduce a ↵Francois Pichet2012-07-221-1/+5
| | | | | | way to disable keywords under Microsoft mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160612 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup: escape @ in a Doxygen comment.James Dennett2012-06-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158548 91177308-0d34-0410-b5e6-96231b3b80d8
* Synchronize the representations of DeclarationName and Selector soDouglas Gregor2012-05-041-9/+9
| | | | | | | | | that bridging between the two is free. Saves ~4k of code size, although I don't see any measurable performance difference (unfortunately). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156187 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment, 'langauge' -> 'language'.Nick Lewycky2012-03-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152547 91177308-0d34-0410-b5e6-96231b3b80d8
* Moving tagging of '__experimental_modules_import' IdentifierInfo out ofTed Kremenek2012-03-011-0/+4
| | | | | | | | | IndentifierTable::get() and into IdentifierTable's constructor. This gets a 0.7% reducing on lexing time for Cocoa.h, and about the same for PCH generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151854 91177308-0d34-0410-b5e6-96231b3b80d8
* Change @import to @__experimental_modules_import. We are not ready to ↵Ted Kremenek2012-03-011-1/+1
| | | | | | | | commit to a particular syntax for modules, and don't have time to push it forward in the near future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151841 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-2/+2
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-1/+13
| | | | | | | | include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-1/+2
| | | | | | appropriate or when GCC requires it) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-uglify #public and #private to #__public_macro and #__private_macro.Douglas Gregor2012-01-031-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147469 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the uglified keyword __import_module__ for importingDouglas Gregor2012-01-031-0/+1
| | | | | | | | | | | | | | | modules. This leaves us without an explicit syntax for importing modules in C/C++, because such a syntax needs to be discussed first. In Objective-C/Objective-C++, the @import syntax is used to import modules. Note that, under -fmodules, C/C++ programs can import modules via the #include mechanism when a module map is in place for that header. This allows us to work with modules in C/C++ without committing to a syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
* Under -fmodules, accept #public <macroname> and #private <macroname>Douglas Gregor2012-01-031-4/+3
| | | | | | | | to make a macro public (the default for headers) or private, respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147455 91177308-0d34-0410-b5e6-96231b3b80d8
* Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer2011-12-231-2/+2
| | | | | | | | so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8