Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
e4bdb935
Commit
e4bdb935
authored
15 years ago
by
John McCall
Browse files
Options
Downloads
Patches
Plain Diff
Publicize getSigilLoc / setSigilLoc for better metaprogramming.
Fix the ReferenceTypeLoc hierarchy. llvm-svn: 84714
parent
7099d0c1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clang/include/clang/AST/TypeLoc.h
+9
-6
9 additions, 6 deletions
clang/include/clang/AST/TypeLoc.h
with
9 additions
and
6 deletions
clang/include/clang/AST/TypeLoc.h
+
9
−
6
View file @
e4bdb935
...
@@ -467,7 +467,7 @@ struct PointerLikeLocInfo {
...
@@ -467,7 +467,7 @@ struct PointerLikeLocInfo {
template
<
class
Derived
,
class
TypeClass
,
class
LocalData
=
PointerLikeLocInfo
>
template
<
class
Derived
,
class
TypeClass
,
class
LocalData
=
PointerLikeLocInfo
>
class
PointerLikeTypeLoc
:
public
ConcreteTypeLoc
<
UnqualTypeLoc
,
Derived
,
class
PointerLikeTypeLoc
:
public
ConcreteTypeLoc
<
UnqualTypeLoc
,
Derived
,
TypeClass
,
LocalData
>
{
TypeClass
,
LocalData
>
{
p
rotected:
p
ublic:
SourceLocation
getSigilLoc
()
const
{
SourceLocation
getSigilLoc
()
const
{
return
this
->
getLocalData
()
->
StarLoc
;
return
this
->
getLocalData
()
->
StarLoc
;
}
}
...
@@ -475,7 +475,6 @@ protected:
...
@@ -475,7 +475,6 @@ protected:
this
->
getLocalData
()
->
StarLoc
=
Loc
;
this
->
getLocalData
()
->
StarLoc
=
Loc
;
}
}
public
:
TypeLoc
getPointeeLoc
()
const
{
TypeLoc
getPointeeLoc
()
const
{
return
this
->
getInnerTypeLoc
();
return
this
->
getInnerTypeLoc
();
}
}
...
@@ -537,8 +536,10 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
...
@@ -537,8 +536,10 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
ReferenceType
>
{
ReferenceType
>
{
};
};
class
LValueReferenceTypeLoc
:
public
PointerLikeTypeLoc
<
LValueReferenceTypeLoc
,
class
LValueReferenceTypeLoc
:
LValueReferenceType
>
{
public
InheritingConcreteTypeLoc
<
ReferenceTypeLoc
,
LValueReferenceTypeLoc
,
LValueReferenceType
>
{
public:
public:
SourceLocation
getAmpLoc
()
const
{
SourceLocation
getAmpLoc
()
const
{
return
getSigilLoc
();
return
getSigilLoc
();
...
@@ -548,8 +549,10 @@ public:
...
@@ -548,8 +549,10 @@ public:
}
}
};
};
class
RValueReferenceTypeLoc
:
public
PointerLikeTypeLoc
<
RValueReferenceTypeLoc
,
class
RValueReferenceTypeLoc
:
RValueReferenceType
>
{
public
InheritingConcreteTypeLoc
<
ReferenceTypeLoc
,
RValueReferenceTypeLoc
,
RValueReferenceType
>
{
public:
public:
SourceLocation
getAmpAmpLoc
()
const
{
SourceLocation
getAmpAmpLoc
()
const
{
return
getSigilLoc
();
return
getSigilLoc
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment