Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
653b8142
Commit
653b8142
authored
Jan 14, 2009
by
Roberto Raggi
Browse files
Accept gcc attributes in cv-qualifiers.
parent
266ee2a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
shared/cplusplus/Parser.cpp
View file @
653b8142
...
...
@@ -751,6 +751,9 @@ bool Parser::parseCvQualifiers(SpecifierAST *&node)
spec
->
specifier_token
=
consumeToken
();
*
ast
=
spec
;
ast
=
&
(
*
ast
)
->
next
;
}
else
if
(
LA
()
==
T___ATTRIBUTE__
)
{
parseAttributeSpecifier
(
*
ast
);
ast
=
&
(
*
ast
)
->
next
;
}
else
{
break
;
}
...
...
tests/auto/cplusplus/ast/ast.pro
View file @
653b8142
load
(
qttest_p4
)
include
(..
/
shared
/
shared
.
pri
)
QT
=
core
SOURCES
+=
tst_ast
.
cpp
tests/auto/cplusplus/ast/tst_ast.cpp
View file @
653b8142
...
...
@@ -36,6 +36,9 @@ public:
{
return
parse
(
source
,
TranslationUnit
::
ParseStatement
);
}
private
slots
:
// declarations
void
gcc_attributes_1
();
// expressions
void
simple_name
();
void
template_id
();
...
...
@@ -54,6 +57,13 @@ private slots:
void
objc_protocol_definition_1
();
};
void
tst_AST
::
gcc_attributes_1
()
{
QSharedPointer
<
TranslationUnit
>
unit
(
parseDeclaration
(
"
\n
"
"static inline void *__attribute__((__always_inline__)) _mm_malloc(size_t size, size_t align);"
));
}
void
tst_AST
::
simple_name
()
{
QSharedPointer
<
TranslationUnit
>
unit
(
parseExpression
(
"a"
));
...
...
tests/manual/cplusplus/conf.c++
View file @
653b8142
...
...
@@ -5,3 +5,4 @@
#define __asm__(a...)
#define restrict
#define __restrict
#define __weak
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment