summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Give nicer note when a member redeclaration has or lacks 'const'Kaelyn Uhrain2011-10-101-1/+11
| | | | llvm-svn: 141555
* Push "out-of-line" declarations into scope when their lexical/semanticDouglas Gregor2011-10-091-1/+3
| | | | | | | redeclaration contexts are the same, as occurs within linkage specifications. Fixes PR9162. llvm-svn: 141521
* A friend template specialization is also dependent if any of itsDouglas Gregor2011-10-091-1/+5
| | | | | | template arguments are dependent. Fixes PR10913. llvm-svn: 141515
* Diagnose attempts to declare a non-static data member with aDouglas Gregor2011-10-091-1/+1
| | | | | | non-identifier name. Fixes PR10839. llvm-svn: 141513
* Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall2011-10-071-2/+2
| | | | | | | for better self-documenting code, since the semantics are subtly different from getDefinition(). llvm-svn: 141355
* Implicitly assume that a ObjC category to an unavailable interface is also ↵Argyrios Kyrtzidis2011-10-061-0/+9
| | | | | | | | unavailable; only give an 'unavailable' error on the @implementation of the category. rdar://10234078 llvm-svn: 141335
* When using an unavailable/deprecated interface Foo inside Foo's ↵Argyrios Kyrtzidis2011-10-061-2/+13
| | | | | | | | interface/implementation don't emit unavailable errors. llvm-svn: 141334
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-1/+2
| | | | | | | | committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! llvm-svn: 141330
* PR11067: A definition of a constexpr static variable doesn't need an ↵Richard Smith2011-10-061-9/+6
| | | | | | initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression. llvm-svn: 141279
* OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,Peter Collingbourne2011-10-061-4/+4
| | | | | | | | | which enables support for C99 storage-class specifiers. This extension is intended to be used by implementations to implement OpenCL C built-in functions. llvm-svn: 141271
* objc arc: Suppress certain arc diagnostics on unavailableFariborz Jahanian2011-10-031-2/+4
| | | | | | functions. // rdar://10186536 llvm-svn: 141037
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-031-1/+2
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* constexpr: semantic checking for constexpr functions and constructors. Based inRichard Smith2011-10-011-5/+9
| | | | | | | | | | | | | part on patches by Peter Collingbourne. We diverge from the C++11 standard in a few areas, mostly related to checking constexpr function declarations, and not just definitions. See WG21 paper N3308=11-0078 for details. Function invocation substitution is not available in this patch; constexpr functions cannot yet be used from within constant expressions. llvm-svn: 140926
* Mark a TagDecl when it is free standing (e.g. "struct foo;")Argyrios Kyrtzidis2011-09-301-0/+3
| | | | llvm-svn: 140894
* Add explicit attributes to mark functions as having had theirJohn McCall2011-09-301-0/+4
| | | | | | | | | | | CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. llvm-svn: 140846
* Suggest adding 'constexpr' if the GNU extension for in-class initializers ↵Richard Smith2011-09-301-0/+4
| | | | | | for static const float members is used in C++11 mode. llvm-svn: 140828
* Mark the ExtWarn for in-class initialization of static const float members ↵Richard Smith2011-09-291-7/+8
| | | | | | as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. llvm-svn: 140820
* In C++0x, static const volatile data members cannot be initialized in-class.Richard Smith2011-09-291-4/+5
| | | | llvm-svn: 140809
* constexpr: semantic checking for constexpr variables.Richard Smith2011-09-291-24/+95
| | | | | | We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier). llvm-svn: 140801
* Revert r140589. It was causing failures during llvm compilation:Bill Wendling2011-09-271-47/+1
| | | | | | | | | | | | | | llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \ then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25: /Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'? {*this = make_error_condition(_e);} ^~~~~~~~~~~~~~~~~~~~ error_condition ... llvm-svn: 140599
* Add typo correction for the type name in C++ "new" statementsKaelyn Uhrain2011-09-271-1/+47
| | | | llvm-svn: 140589
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-3/+3
| | | | llvm-svn: 140478
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-3/+1
| | | | llvm-svn: 140407
* Don't propagate the 'availability' attribute through declarationDouglas Gregor2011-09-231-2/+4
| | | | | | | | merging for overrides. One might want to make a method's availability in a superclass different from that of its subclass. Fixes <rdar://problem/10166223>. llvm-svn: 140406
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-6/+6
| | | | llvm-svn: 140367
* ArrayRef-ifying the fields passed to Sema::ActOnFieldsDavid Blaikie2011-09-221-8/+9
| | | | llvm-svn: 140293
* ArrayRef-ifying Function/BlockDecl's setParamsDavid Blaikie2011-09-211-3/+3
| | | | llvm-svn: 140268
* [microsoft] Move missing typename warning from -fms-extensions to ↵Francois Pichet2011-09-211-2/+2
| | | | | | -fms-compatibility. Also allow the missing typename warning at function scope. llvm-svn: 140240
* Remove redundant break statements, and replace asserts with llvm_unreachablePeter Collingbourne2011-09-201-2/+1
| | | | | | Per John's review comments for r140068. llvm-svn: 140142
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-191-0/+19
| | | | llvm-svn: 140068
* Fix PR10531. Attach an initializer to anonymous unions, since the default ↵Richard Smith2011-09-181-0/+6
| | | | | | constructor might not be trivial (if there is an in-class initializer for some member) and might be deleted. llvm-svn: 139991
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-17/+18
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclarationKaelyn Uhrain2011-09-141-2/+7
| | | | llvm-svn: 139718
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-131-2/+2
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Kill off an irrelevant FIXMEDouglas Gregor2011-09-121-4/+1
| | | | llvm-svn: 139523
* Diagnose attempt to mark function-local declarations as __module_private__.Douglas Gregor2011-09-121-7/+35
| | | | llvm-svn: 139519
* Allow __module_private__ on fieldsDouglas Gregor2011-09-121-0/+6
| | | | llvm-svn: 139499
* Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge2011-09-091-0/+6
| | | | | | | annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. llvm-svn: 139423
* Specializations cannot be module-hidden. Diagnose attempts to do so.Douglas Gregor2011-09-091-6/+24
| | | | llvm-svn: 139406
* __module_private__ is inherited by redeclarations of an entity, andDouglas Gregor2011-09-091-7/+31
| | | | | | must also be present of the first declaration of that entity. llvm-svn: 139384
* Propagate __module_private__ from previous declarations to laterDouglas Gregor2011-09-091-1/+19
| | | | | | declarations. llvm-svn: 139380
* Modules: introduce the __module_private__ declaration specifier, whichDouglas Gregor2011-09-091-0/+17
| | | | | | | indicates that a declaration is only visible within the module it is declared in. llvm-svn: 139348
* Change all references of type ExprTy to Expr and get rid of the typedefs.Richard Trieu2011-09-091-3/+3
| | | | llvm-svn: 139347
* Thread safety: added support for function scopes in attribute arguments.Caitlin Sadowski2011-09-081-0/+23
| | | | | | This patch was written by DeLesley Hutchins. llvm-svn: 139302
* Thread Safety: Patch to implement delayed parsing of attributes within aCaitlin Sadowski2011-09-081-0/+9
| | | | | | | | class scope. This patch was also written by DeLesley Hutchins. llvm-svn: 139301
* Adding FixIts to static/inline main declaration diagnostics.David Blaikie2011-09-081-35/+36
| | | | llvm-svn: 139282
* Change the self-reference visitor (which gives the warning for ↵Richard Trieu2011-09-071-0/+1
| | | | | | | | self-reference oninitalization warning of -Wuninitialized) to exclude member variables that can decay into pointers. This will cause it to no longer warn on this code: struct foo { char a[100], *e; } bar = { .e = bar.a }; llvm-svn: 139213
* Implement the Named Return Value Optimization (NRVO) for blocks.Douglas Gregor2011-09-061-3/+3
| | | | llvm-svn: 139178
* Implement the Named Return Value Optimization (NRVO) for Objective-C++Douglas Gregor2011-09-061-0/+3
| | | | | | methods. Fixes PR10835 / <rdar://problem/10050178>. llvm-svn: 139175
* Add test case for defaulted copy and move structure validation.Sebastian Redl2011-09-041-0/+2
| | | | | | | | Fix bug this uncovered. Address minor comments from Doug. Enable cxx_implicit_moves feature. llvm-svn: 139101
OpenPOWER on IntegriCloud