[MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier
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
This commit is contained in:
@@ -3812,6 +3812,9 @@ void Sema::CodeCompleteTypeQualifiers(DeclSpec &DS) {
|
||||
if (getLangOpts().C11 &&
|
||||
!(DS.getTypeQualifiers() & DeclSpec::TQ_atomic))
|
||||
Results.AddResult("_Atomic");
|
||||
if (getLangOpts().MSVCCompat &&
|
||||
!(DS.getTypeQualifiers() & DeclSpec::TQ_unaligned))
|
||||
Results.AddResult("__unaligned");
|
||||
Results.ExitScope();
|
||||
HandleCodeCompleteResults(this, CodeCompleter,
|
||||
Results.getCompletionContext(),
|
||||
|
||||
Reference in New Issue
Block a user