aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/IdentifierTable.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-08-22Objective-C. Warn if user has made explicit callFariborz Jahanian1-0/+1
to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
2014-05-10Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer1-1/+3
Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
2014-05-08[C++11] Use 'nullptr'.Craig Topper1-4/+4
llvm-svn: 208280
2014-03-18Fix a typo in r204164 that made *all* keywords available in OpenCL mode.Richard Smith1-1/+1
llvm-svn: 204196
2014-03-18Creating a printing policy for "half":Yunzhong Gao1-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 llvm-svn: 204164
2014-03-11[C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper1-1/+1
class. llvm-svn: 203537
2014-01-14Rename language option MicrosoftMode to MSVCCompatAlp Toker1-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. llvm-svn: 199209
2014-01-07Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth1-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. llvm-svn: 198686
2014-01-03Fixed a FIXME; created a print method for Selectors that accepts a ↵Aaron Ballman1-0/+4
raw_ostream, and started using it in places it made sense. No functional changes intended, just API cleanliness. llvm-svn: 198428
2013-10-10ObjectiveC migrator: For 'default' and 'shared' family ofFariborz Jahanian1-3/+3
methods, infer their self's type as their result type. // rdar://15145218 llvm-svn: 192377
2013-10-07ObjectiveC migrator: A typical implementation ofFariborz Jahanian1-1/+0
'default' methods in Foundation does not infer 'instancetype' for methods' result type. // rdar://15145218 llvm-svn: 192129
2013-09-18ObjectiveC migrator: For consistency, also inferFariborz Jahanian1-0/+2
'instancetype' for known family of methods with related result type; such as 'init' methods. // rdar://14987948 llvm-svn: 190956
2013-08-29ObjectiveC migrator: remove dead code.Fariborz Jahanian1-9/+1
llvm-svn: 189592
2013-08-02ObjectiveC migrator: Add another family of factory Fariborz Jahanian1-0/+5
methods which can be migrated to instancetype. llvm-svn: 187672
2013-08-02ObjectiveC migrator: Fixes public buildbot failures,Fariborz Jahanian1-8/+0
in my previous patch which was reverted in r187657 llvm-svn: 187661
2013-08-02revert patch I added in r187655. It still breaks publicFariborz Jahanian1-0/+8
buildbot. llvm-svn: 187657
2013-08-02ObjectiveC migration. Check-in patch reverted in r187634.Fariborz Jahanian1-8/+0
Also removed check for "NS" prefix for class name. llvm-svn: 187655
2013-08-02Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods ↵Rafael Espindola1-0/+8
with certain prefix selector matching their class names' suffix." This reverts commit r187626. It is breaking the bots. llvm-svn: 187634
2013-08-01ObjectiveC migrator. Migrate to instancetype return typeFariborz Jahanian1-8/+0
for mehods with certain prefix selector matching their class names' suffix. llvm-svn: 187626
2013-07-24Objective-C migrator: some cleanup.Fariborz Jahanian1-0/+3
Expose static type of init/alloc/retain with instance type as well. Ad-hoc cases are coming next. llvm-svn: 187068
2013-07-23ObjC migrator: more knobs toward doingFariborz Jahanian1-1/+1
instancetype migration. llvm-svn: 187000
2013-07-23ObjC migrator: Define family of methodsFariborz Jahanian1-0/+33
which are candidate for migrating to 'instancetype'. wip. llvm-svn: 186981
2013-06-10cleanup (address some more review comments for r183474):Adrian Prantl1-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. llvm-svn: 183697
2013-06-07address some comments on r183474:Adrian Prantl1-10/+14
- factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 llvm-svn: 183582
2013-04-17[Modules] Use global index to improve typo correction performanceArgyrios Kyrtzidis1-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 llvm-svn: 179730
2013-02-09Remove some stray uses of <ctype.h> functions.Jordan Rose1-1/+1
These are causing assertions on some MSVC builds. llvm-svn: 174805
2013-02-08Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose1-4/+3
Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
2013-01-02s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith1-3/+3
nearby 'C++0x' comments. llvm-svn: 171372
2013-01-02s/CPlusPlus0x/CPlusPlus11/gRichard Smith1-1/+1
llvm-svn: 171367
2012-12-11Use @import rather than @__experimental_modules_import, since theDouglas Gregor1-1/+1
latter is rather a mess to type. llvm-svn: 169919
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-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. llvm-svn: 169237
2012-11-11Remove unneeded includes from IdentifierTableNico Weber1-1/+0
llvm-svn: 167694
2012-09-25Macro history (de-)serialization. Deserialization currently reads only the ↵Alexander Kornienko1-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 llvm-svn: 164610
2012-09-05Allow disabling of wchar_t type.Abramo Bagnara1-0/+2
llvm-svn: 163221
2012-08-10Add missing cctype includes.Joerg Sonnenberger1-0/+1
llvm-svn: 161660
2012-07-24Change the way KEYNOMS is defined to be more comprehensible. Francois Pichet1-2/+2
llvm-svn: 160663
2012-07-22char16_t and char32_t are defined via typedef in MSVC 11 RC. So introduce a ↵Francois Pichet1-1/+5
way to disable keywords under Microsoft mode. llvm-svn: 160612
2012-06-15Documentation cleanup: escape @ in a Doxygen comment.James Dennett1-2/+2
llvm-svn: 158548
2012-05-04Synchronize the representations of DeclarationName and Selector soDouglas Gregor1-9/+9
that bridging between the two is free. Saves ~4k of code size, although I don't see any measurable performance difference (unfortunately). llvm-svn: 156187
2012-03-11Fix typo in comment, 'langauge' -> 'language'.Nick Lewycky1-1/+1
llvm-svn: 152547
2012-03-01Moving tagging of '__experimental_modules_import' IdentifierInfo out ofTed Kremenek1-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. llvm-svn: 151854
2012-03-01Change @import to @__experimental_modules_import. We are not ready to ↵Ted Kremenek1-1/+1
commit to a particular syntax for modules, and don't have time to push it forward in the near future. llvm-svn: 151841
2012-02-05Basic: import SmallString<> into clang namespaceDylan Noblesmith1-2/+2
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
2012-02-04Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer1-1/+13
include. Fix all the transitive include users. llvm-svn: 149783
2012-01-17Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie1-1/+2
appropriate or when GCC requires it) llvm-svn: 148292
2012-01-03Re-uglify #public and #private to #__public_macro and #__private_macro.Douglas Gregor1-2/+4
llvm-svn: 147469
2012-01-03Eliminate the uglified keyword __import_module__ for importingDouglas Gregor1-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. llvm-svn: 147467
2012-01-03Under -fmodules, accept #public <macroname> and #private <macroname>Douglas Gregor1-4/+3
to make a macro public (the default for headers) or private, respectively. llvm-svn: 147455
2011-12-23Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer1-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. llvm-svn: 147221
2011-12-19objc-arc: bridge casts in non-objc-arc mode are ignord.Fariborz Jahanian1-1/+3
But, warn too. // rdar://10597832 llvm-svn: 146904