summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Access control for overloaded call operators. Not for surrogates yet,John McCall2010-01-281-0/+5
| | | | | | | | mostly because we're going to want a better diagnostic for conversions. Also this API needs to go back to sanity. llvm-svn: 94730
* Access checking for overloaded operators.John McCall2010-01-283-5/+32
| | | | llvm-svn: 94725
* Add placeholder function in Sema for new format string checking logic.Ted Kremenek2010-01-282-1/+25
| | | | | | | | This function will use the format string parsing logic in libAnalysis, and once it is shown to be better than the current implementation it will replace AlternateCheckPrintfString() entirely. llvm-svn: 94721
* Fix 80 col violation.Ted Kremenek2010-01-281-1/+3
| | | | llvm-svn: 94717
* Remove invalid conversion specifiers from format string checking.Ted Kremenek2010-01-281-5/+0
| | | | llvm-svn: 94707
* Fix a major oversight in the comparison of standard conversionDouglas Gregor2010-01-274-39/+81
| | | | | | | | | | | | | | sequences, where we would occasionally determine (incorrectly) that one standard conversion sequence was a proper subset of another when, in fact, they contained completely incomparable conversions. This change records the types in each step within a standard conversion sequence, so that we can check the specific comparison types to determine when one sequence is a proper subset of the other. Fixes this testcase (thanks, Anders!), which was distilled from PR6095 (also thanks to Anders). llvm-svn: 94660
* Implement access-check delays for out-of-line member definitionsJohn McCall2010-01-273-28/+136
| | | | | | using the same framework we use for deprecation warnings. llvm-svn: 94659
* Implement access control for overloaded functions. Suppress access controlJohn McCall2010-01-277-95/+182
| | | | | | | diagnostics in "early" lookups, such as during typename checks and when building unresolved lookup expressions. llvm-svn: 94647
* Avoid some unnecessary copying of unresolved lookup results.John McCall2010-01-261-16/+12
| | | | llvm-svn: 94531
* Handle redeclarations found by ADL deterministically and reasonably.John McCall2010-01-264-16/+87
| | | | | | | | | This solution relies on an O(n) scan of redeclarations, which means it might scale poorly in crazy cases with tons of redeclarations brought in by a ton of distinct associated namespaces. I believe that avoiding this is not worth the common-case cost. llvm-svn: 94530
* Correctly treat 64 bit integers specified via the mode attribute as the 'long'Chandler Carruth2010-01-261-2/+8
| | | | | | | | | | type when that type is 64 bits wide, and the 'long long' type when 'long' is only 32 bits wide. This fixes PR6108. Also adds a bunch of test cases to ensure proper conversion between equally sized standard types and mode-specified types on both 32 and 64 bit targets. llvm-svn: 94527
* Allow ADL to find functions imported by using decls. Leave wordy commentJohn McCall2010-01-262-12/+21
| | | | | | about interaction between ADL and default arguments. Shrug shoulders, commit. llvm-svn: 94524
* Preserve access bits through overload resolution much better. SomeJohn McCall2010-01-266-103/+86
| | | | | | general refactoring in operator resolution. llvm-svn: 94498
* Pass access specifiers around in overload resolution.John McCall2010-01-267-54/+107
| | | | llvm-svn: 94485
* Code simplification; this should have no visible effects.Eli Friedman2010-01-251-33/+2
| | | | llvm-svn: 94427
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | (1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
* -fno-rtti is now the default.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94379
* Implement [dcl.fct.spec]p6.Anders Carlsson2010-01-241-0/+22
| | | | llvm-svn: 94365
* Implement instantiation of AsmStmts (Crazy, I know)Anders Carlsson2010-01-243-5/+90
| | | | llvm-svn: 94361
* fix PR6034, a crash on invalid where the switch stack would get Chris Lattner2010-01-242-0/+12
| | | | | | unbalanced. llvm-svn: 94347
* Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes ↵Anders Carlsson2010-01-241-16/+28
| | | | | | the bug where array elements and member initializers weren't copied correctly. llvm-svn: 94340
* Change all InitializedEntity pointers over to be references.Anders Carlsson2010-01-231-137/+81
| | | | llvm-svn: 94335
* Start passing InitializedEntity to CheckDesignatedInitializer.Anders Carlsson2010-01-231-9/+22
| | | | llvm-svn: 94334
* Preserve access for enum constants during template instantiation.John McCall2010-01-231-0/+1
| | | | llvm-svn: 94333
* More init work, adding more entity parameters.Anders Carlsson2010-01-231-10/+27
| | | | llvm-svn: 94332
* Use the new init code for member subobjects.Anders Carlsson2010-01-231-6/+18
| | | | llvm-svn: 94329
* Switch some array initialization over to the new init code.Anders Carlsson2010-01-231-7/+22
| | | | llvm-svn: 94327
* Baby steps towards migrating the InitListChecker over to the new ↵Anders Carlsson2010-01-231-33/+65
| | | | | | initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++. llvm-svn: 94325
* When an InitializedEntity is passed to CheckSingleInitializer, call the new ↵Anders Carlsson2010-01-231-22/+36
| | | | | | Sema::PerformCopyInitialization overload. llvm-svn: 94324
* Change CheckSingleInitializer to take/return OwningExprResults instead. No ↵Anders Carlsson2010-01-231-24/+46
| | | | | | functionality change. llvm-svn: 94316
* Simplify code with StringRef.Benjamin Kramer2010-01-231-6/+5
| | | | llvm-svn: 94314
* Produce a special diagnostic when users call a function with an argument ofJohn McCall2010-01-231-1/+16
| | | | | | | | | | | | | | | | incomplete type (or a pointer/reference to such). The causes of this problem are different enough to justify a different "design" for the diagnostic. Most notably, it doesn't give an operand index: it's usually pretty obvious which operand is the problem, it adds a lot of clutter to mention it, and the fix is usually in a different part of the file anyway. This is yet another diagnostic that should really have an analogue in the non-overloaded case --- which should be much easier to write because of the weaker space constraints. llvm-svn: 94303
* Fix the EntityKind order so that all entity kinds that can be copied (using ↵Anders Carlsson2010-01-231-5/+5
| | | | | | copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :) llvm-svn: 94289
* During overload resolution diagnostics, sort non-viable candidates by the ↵John McCall2010-01-232-5/+122
| | | | | | | | | | | | | quality of their conversions. To make this work, fill out all conversions for all candidates (but only when diagnosing overload failure). Split out a few cases from ovl_fail_bad_conversion which didn't actually involve a failed argument conversion. I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters. llvm-svn: 94283
* Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; ↵Anders Carlsson2010-01-232-12/+24
| | | | | | arrays and vectors are pretty different beasts in C++. Doug, please review/comment. llvm-svn: 94279
* Implement elementary access control.John McCall2010-01-235-3/+151
| | | | llvm-svn: 94268
* outside a method, 'super' should resolve in a normal name look upFariborz Jahanian2010-01-221-1/+11
| | | | | | to mimic gcc's behavior. Fixes radar 7400691. llvm-svn: 94246
* Patch fixes a lookup bug in c++'s anonymous union memberFariborz Jahanian2010-01-221-1/+7
| | | | | | lookup. Fixes radar 7562438. llvm-svn: 94191
* No need to canonicalize the type and use dyn_cast. Also, correctly diagnose ↵Anders Carlsson2010-01-221-12/+10
| | | | | | trying to override a function returning an lvalue reference with a function overriding an rvalue reference. llvm-svn: 94183
* Fix an obvious goof that caused us to only see the top level of return typesChandler Carruth2010-01-221-4/+4
| | | | | | | | | when checking for covariance. Added some fun test cases, fixes PR6110. This felt obvious enough to just commit. ;] Let me know if anything needs tweaking. llvm-svn: 94173
* Use raw_ostream instead of cstdio.Daniel Dunbar2010-01-221-19/+21
| | | | llvm-svn: 94136
* Create function, block, and template parameters in the context of theJohn McCall2010-01-224-9/+20
| | | | | | | | | translation unit. This is temporary for function and block parameters; template parameters can just stay this way, since Templates aren't DeclContexts. This gives us the nice property that everything created in a record DC should have access in C++. llvm-svn: 94122
* Wire up the new range reporting for unreachable code.Mike Stump2010-01-211-6/+16
| | | | llvm-svn: 94118
* Improve unreachable code warnings with respect to dead member andMike Stump2010-01-211-0/+12
| | | | | | dead array references. llvm-svn: 94115
* Improve unreachable code warnings for with respect to dead functional casts ↵Mike Stump2010-01-211-0/+5
| | | | | | in C++. llvm-svn: 94106
* Improve unreachable code warnings for with respect to c-style casts.Mike Stump2010-01-211-0/+5
| | | | llvm-svn: 94094
* Improve unreachable code warnings for with respect to ? :.Mike Stump2010-01-211-4/+15
| | | | llvm-svn: 94093
* Patch to implement rewriting of properties.Fariborz Jahanian2010-01-211-1/+2
| | | | | | Fixes radar 7562952. llvm-svn: 94087
* Improve unreachable code warnings for with respect to compoundMike Stump2010-01-211-0/+6
| | | | | | assignments. llvm-svn: 94086
* Improve unreachable code warnings with respect to dead binary andMike Stump2010-01-211-6/+20
| | | | | | unary operators. llvm-svn: 94084
OpenPOWER on IntegriCloud