1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.
llvm-svn: 52914
decl attributes out of the various places they can hide. This makes
us correctly reject things like this:
t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^
because you can't make a pointer be HImode.
llvm-svn: 52876
to work list the rest of the attr handlers. Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.
llvm-svn: 52872
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.
This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.
llvm-svn: 52871
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).
llvm-svn: 52853
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.
This fixes rdar://6032532.
llvm-svn: 52769
Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.
llvm-svn: 52694
isn't guaranteed to exist. This fixes a crash with conflicting typedefs
coming from stdin.
This also fixes the crash in PR2406, but doesn't completely fix the
issue; it appears there's something strange about the physical location
for the definition of int64_t in stdlib.h.
llvm-svn: 52209
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp). Also removes an odd test that even gcc doesn't accept.
The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.
The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".
llvm-svn: 52120
type; this isn't explicitly stated in the standard, but it doesn't
really make sense for them to have an effect here. Fixes the included
testcase, sent to me by Steve Naroff.
llvm-svn: 52113
- Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods.
- Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup.
llvm-svn: 52005
In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").
llvm-svn: 52001