| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds parsing of the qualifiers __ptr32, __ptr64, __sptr, and __uptr and
lowers them to the corresponding address space pointer for 32-bit and 64-bit pointers.
(32/64-bit pointers added in https://reviews.llvm.org/D69639)
A large part of this patch is making these pointers ignore the address space
when doing things like overloading and casting.
https://bugs.llvm.org/show_bug.cgi?id=42359
Reviewers: rnk, rsmith
Subscribers: jholewinski, jvesely, nhaehnle, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71039
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some Windows SDK classes, for example
Windows::Storage::Streams::IBufferByteAccess, use the ATL way of spelling
attributes:
[uuid("....")] class IBufferByteAccess {};
To be able to use __uuidof() to grab the uuid off these types, clang needs to
support uuid as a Microsoft attribute. There was already code to skip Microsoft
attributes, extend that to look for uuid and parse it. Use the new "Microsoft"
attribute type added in r280575 (and r280574, r280576) for this.
Final part of https://reviews.llvm.org/D23895
llvm-svn: 280578
|
|
|
|
|
|
|
|
|
| |
We didn't correctly detect situations where a flexible array member was
the only named member in a record.
This fixes PR28407.
llvm-svn: 274477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements support for MS-specific __unaligned qualifier in functions and
makes the following test case both compile and mangle correctly:
struct S {
void f() __unaligned;
};
void S::f() __unaligned {
}
Differential Revision: http://reviews.llvm.org/D20437
llvm-svn: 270834
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements __unaligned (MS extension) as a proper type qualifier
(before that, it was implemented as an ignored attribute).
It also fixes PR27367 and PR27666.
Differential Revision: http://reviews.llvm.org/D20103
llvm-svn: 269220
|
|
|
|
| |
llvm-svn: 268736
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements __unaligned (MS extension) as a proper type qualifier
(before that, it was implemented as an ignored attribute).
It also fixes PR27367.
Differential Revision: http://reviews.llvm.org/D19654
llvm-svn: 268727
|
|
|
|
| |
llvm-svn: 266431
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements __unaligned as a type qualifier; before that, it was
modeled as an attribute. Proper mangling of __unaligned is implemented as well.
Some OpenCL code/tests are tangenially affected, as they relied on existing
number and sizes of type qualifiers.
Differential Revision: http://reviews.llvm.org/D18596
llvm-svn: 266415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we would not mark structs containing anonymous structs as
invalid. Later, horrific things would occur when trying to determine
the size of the parent record.
Instead, require the struct to be a complete type when used as an
anonymous struct. Mark both the anonymous field for the struct and the
parent context as invalid (this is similar to what we do when a struct
contains a field with an incomplete type.)
This fixes PR11847.
llvm-svn: 218006
|
|
|
|
| |
llvm-svn: 216485
|
|
|
|
|
|
|
|
| |
feature is c11 about nested struct declarations must have
struct-declarator-list. Without this change, code
which was meant for c99 breaks. rdar://18125536
llvm-svn: 216469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang used a custom implementation of lookup when handling designated
initializers. The custom code was not particularly optimized and relied
on standard lookup for typo-correction anyway.
This custom code has to go, it doesn't properly support MSVC-style
anonymous structs embedded inside other records; replace it with the
typo-correction path.
This has the side effect of speeding up semantic handling of the fields
for a designated initializer while simplifying the code at the same
time.
This fixes PR20573.
Differential Revision: http://reviews.llvm.org/D4839
llvm-svn: 215372
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had two bugs:
- We wouldn't properly warn when a struct/union/enum was mentioned
inside of a record definition if no declarator was provided. We
should have mentioned that this declaration declares nothing.
- We didn't properly support Microsoft's extension where certain
declspecs without declarators would act as anonymous structs/unions.
* We completely ignored the case where such a declspec could be a
union.
* We didn't properly handle the case where a record was defined inside
another record:
struct X {
int a;
struct Y {
int b;
};
};
llvm-svn: 215347
|
|
|
|
|
|
|
| |
Now that we support WoA, this test fails on ARM build bots as __va_start has a
different signature on different architectures.
llvm-svn: 213714
|
|
|
|
| |
llvm-svn: 204872
|
|
|
|
|
|
|
|
|
|
| |
The main difference between __va_start and __builtin_va_start is that
the address of the va_list has already been taken, and the va_list is
always a char*.
__va_end and __va_arg are not needed.
llvm-svn: 204821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'deprecated'.
Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.
This change looks large, but all it does is reuse and consolidate
the delayed diagnostic logic for deprecation warnings with unavailability
warnings. By doing so, it showed various inconsistencies between the
diagnostics, which were close, but not consistent. It also revealed
some missing "note:"'s in the deprecated diagnostics that were showing
up in the unavailable diagnostics, etc.
This change also changes the wording of the core deprecation diagnostics.
Instead of saying "function has been explicitly marked deprecated"
we now saw "'X' has been been explicitly marked deprecated". It
turns out providing a bit more context is useful, and often we
got the actual term wrong or it was not very precise
(e.g., "function" instead of "destructor"). By just saying the name
of the thing that is deprecated/deleted/unavailable we define
this issue away. This diagnostic can likely be further wordsmithed
to be shorter.
llvm-svn: 197627
|
|
|
|
|
|
| |
as behaviorally in MSVC). This adds a generic diagnostic that we use for uuid, and can use for some other attributes as well, and adds a testcase.
llvm-svn: 195580
|
|
|
|
| |
llvm-svn: 187400
|
|
|
|
|
|
| |
with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case.
llvm-svn: 186578
|
|
|
|
|
|
|
|
|
|
|
|
| |
This became allowed by accident in r131201, but triggers an assert.
That patch added an exception to allow conversion from pointers to
narrow integral types for MSVC compatibility. However, a pointer can
already be converted to bool in a civilized manner; allowing conversion
via reinterpret_cast is a bad idea.
Fixes PR16222.
llvm-svn: 183394
|
|
|
|
|
|
|
|
|
|
| |
pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes.
For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx
Patch reviewed by Richard Smith.
llvm-svn: 182535
|
|
|
|
|
|
| |
just to account for us emitting notes more consistently.
llvm-svn: 161528
|
|
|
|
|
|
| |
conflicts from a separate problematic patch.
llvm-svn: 158750
|
|
|
|
|
|
|
|
| |
The original r158700 caused crashes in the gcc test suite,
g++.abi/vtable3a.C among others. It also caused failures in the libc++
test suite.
llvm-svn: 158749
|
|
|
|
|
|
| |
includes support for the align (which fixes PR12631).
llvm-svn: 158717
|
|
|
|
|
|
| |
location. // rdar://10893232
llvm-svn: 155385
|
|
|
|
| |
llvm-svn: 151225
|
|
|
|
|
|
| |
so -fms-extensions doesn't affect enum semantics in incompatible ways. <rdar://problem/10657186>.
llvm-svn: 150663
|
|
|
|
|
|
| |
Fixes PR11847. Patch from Jason Haslam!
llvm-svn: 149460
|
|
|
|
| |
llvm-svn: 131202
|
|
|
|
|
|
| |
fixed-underlying-type extension for enumeration types
llvm-svn: 126250
|
|
|
|
|
|
|
|
|
| |
enum X : long { Value = 0x100000000 };
when in Microsoft-extension mode (-fms-extensions). This (now C++0x)
feature has been supported since Microsoft Visual Studio .NET 2003.
llvm-svn: 126243
|
|
|
|
|
|
| |
Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx
llvm-svn: 120000
|
|
|
|
|
|
|
| |
1. enum underlying type is int by default.
2. Error "enumerator value is not representable in the underlying type"is a ExtWarning
llvm-svn: 116704
|
|
|
|
|
|
|
| |
automatically when syncing due to the auto-props selecting svn:eol-style of
'native'.
llvm-svn: 115758
|
|
- in union
- as the only element of a struct/class.
llvm-svn: 113909
|