- Feb 13, 2009
-
-
Ted Kremenek authored
Add test case illustrating special handling of 'SenTestCase' subclasses for the missing -dealloc check. llvm-svn: 64494
-
Daniel Dunbar authored
- PR3566 llvm-svn: 64492
-
Chris Lattner authored
just silently return an error to avoid bogus diagnostics. llvm-svn: 64491
-
Daniel Dunbar authored
- Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly llvm-svn: 64488
-
rdar://6562329Chris Lattner authored
wine sources. This was happening because HighlightMacros was calling EnterMainFile multiple times on the same preprocessor object and getting an assert due to the new #line stuff (the file in question was bison output with #line directives). The fix for this is to not reenter the file. Instead, relex the tokens in raw mode, swizzle them a bit and repreprocess the token stream. An added bonus of this is that rewrite macros will now hilight the macro definition as well as its uses. Woo. llvm-svn: 64480
-
Daniel Dunbar authored
llvm-svn: 64478
-
Douglas Gregor authored
llvm-svn: 64472
-
Fariborz Jahanian authored
implementation with no category declaration! llvm-svn: 64470
-
Anders Carlsson authored
llvm-svn: 64447
-
Anders Carlsson authored
llvm-svn: 64445
-
Anders Carlsson authored
llvm-svn: 64441
-
Eli Friedman authored
Currently only used for 128-bit integers. Note that we can't use the fixed-width integer types for other integer modes without other changes because glibc headers redefines (u)int*_t and friends using the mode attribute. For example, this means that uint64_t has to be compatible with unsigned __attribute((mode(DI))), and uint64_t is currently defined to long long. And I have a feeling we'll run into issues if we try to define uint64_t as something which isn't either long or long long. This doesn't get the alignment right in most cases, including the 128-bit integer case; I'll file a PR shortly. The gist of the issue is that the targets don't really expose the information necessary to figure out the alignment outside of the target description, so there's a non-trivial amount of work involved in getting it working right. That said, the alignment used is conservative, so the only issue with the current implementation is ABI compatibility. This makes it trivial to add some sort of "bitwidth" attribute to make arbitrary-width integers; I'll do that in a followup. We could also use this for stuff like the following for compatibility with gcc, but I have a feeling it would be a better idea for clang to be consistent between C and C++ modes rather than follow gcc's example for C mode. struct {unsigned long long x : 33;} x; unsigned long long a(void) {return x.x+1;} llvm-svn: 64434
-
Douglas Gregor authored
llvm-svn: 64425
-
Ted Kremenek authored
llvm-svn: 64417
-
Douglas Gregor authored
given name in a given scope is marked as "overloadable", every function declaration and definition with that same name and in that same scope needs to have the "overloadable" attribute. Essentially, the "overloadable" attribute is not part of attribute merging, so it must be specified even for redeclarations. This keeps users from trying to be too sneaky for their own good: double sin(double) __attribute__((overloadable)); // too sneaky #include <math.h> Previously, this would have made "sin" overloadable, and therefore given it a mangled name. Now, we get an error inside math.h when we see a (re)declaration of "sin" that doesn't have the "overloadable" attribute. llvm-svn: 64414
-
Douglas Gregor authored
ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. llvm-svn: 64413
-
Daniel Dunbar authored
llvm-svn: 64411
-
Mike Stump authored
_GCC_LIMITS_H_ is defined, when __GNUC__ is defined. Also, we need to stay away from possible conflicts with header guards. We should use CLANG_ to prefix all header guards. llvm-svn: 64408
-
- Feb 12, 2009
-
-
Douglas Gregor authored
llvm-svn: 64396
-
-
Douglas Gregor authored
union subobject initialization before checking whether the next initiailizer was actually a designated initializer. This led to spurious "excess elements in union initializer" errors. Thanks to rdivacky for reporting the bug! llvm-svn: 64392
-
Daniel Dunbar authored
llvm-svn: 64380
-
Steve Naroff authored
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning). llvm-svn: 64375
-
Daniel Dunbar authored
designating an object. llvm-svn: 64371
-
Daniel Dunbar authored
llvm-svn: 64368
-
Douglas Gregor authored
llvm-svn: 64347
-
Douglas Gregor authored
complex conversions where the conversion between the real types is an integral promotion. This is how G++ handles complex promotions for its complex integer extension. llvm-svn: 64344
-
Douglas Gregor authored
system. Since C99 doesn't have overloading and C++ doesn't have _Complex, there is no specification for this. Here's what I think makes sense. Complex conversions come in several flavors: - Complex promotions: a complex -> complex conversion where the underlying real-type conversion is a floating-point promotion. GCC seems to call this a promotion, EDG does something else. This is given "promotion" rank for determining the best viable function. - Complex conversions: a complex -> complex conversion that is not a complex promotion. This is given "conversion" rank for determining the best viable function. - Complex-real conversions: a real -> complex or complex -> real conversion. This is given "conversion" rank for determining the best viable function. These rules are the same for C99 (when using the "overloadable" attribute) and C++. However, there is one difference in the handling of floating-point promotions: in C99, float -> long double and double -> long double are considered promotions (so we give them "promotion" rank), while C++ considers these conversions ("conversion" rank). llvm-svn: 64343
-
- Feb 11, 2009
-
-
Steve Naroff authored
llvm-svn: 64330
-
rdar://problem/6505139Steve Naroff authored
Fix <rdar://problem/6505139> [clang on growl]: need to allow unnamed selectors as the first argument llvm-svn: 64320
-
-
Douglas Gregor authored
for non-external names whose address becomes the template argument. This completes C++ [temp.arg.nontype]p1. Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs from EDG's interpretation (we're stricter, and GCC agrees with us). They're opening a core issue about the matter. llvm-svn: 64317
-
Douglas Gregor authored
template specialization (e.g., std::vector<int> would now be well-formed, since it relies on a default argument for the Allocator template parameter). This is much less interesting than one might expect, since (1) we're not actually using the default arguments for anything important, such as naming an actual Decl, and (2) we'll often need to instantiate the default arguments to check their well-formedness. The real fun will come later. llvm-svn: 64310
-
rdar://problem/6206858Steve Naroff authored
Added a FIXME to handle 'rethrow' check. llvm-svn: 64308
-
Douglas Gregor authored
pointer-to-member-data non-type template parameters. Also, get consistent about what it means to returned a bool from CheckTemplateArgument. llvm-svn: 64305
-
Chris Lattner authored
finishing off rdar://6520707 llvm-svn: 64295
-
-
Douglas Gregor authored
non-type template parameters that are references to functions or pointers to member functions. Did a little bit of refactoring so that these two cases, along with the handling of non-type template parameters that are pointers to functions, are handled by the same path. Also, tweaked FixOverloadedFunctionReference to cope with member function pointers. This is a necessary step for getting all of the fun member pointer conversions working outside of template arguments, too. llvm-svn: 64277
-
Douglas Gregor authored
template parameters that have reference type. Effectively, we're doing a very limited form of reference binding here. llvm-svn: 64270
-
Douglas Gregor authored
non-type template parameters of pointer-to-object and pointer-to-function type. The most fun part of this is the use of overload resolution to pick a function from the set of overloaded functions that comes in as a template argument. Also, fixed two minor bugs in this area: - We were allowing non-type template parameters of type pointer to void. - We weren't patching up an expression that refers to an overloaded function set via "&f" properly. We're still not performing complete checking of the expression to be sure that it is referring to an object or function with external linkage (C++ [temp.arg.nontype]p1). llvm-svn: 64266
-