C++: Fix mixed tabs and spaces in non-test code

This commit is contained in:
Dave Bartolomeo
2018-11-07 11:32:17 -08:00
parent 0afbea968c
commit 5bf88f0f0a
17 changed files with 127 additions and 127 deletions

View File

@@ -5,11 +5,11 @@
import cpp
string exprString(Expr e) {
if (e instanceof ArrayToPointerConversion) then (
result = e.(ArrayToPointerConversion).getExpr().(Literal).getValue()
) else (
result = e.toString()
)
if (e instanceof ArrayToPointerConversion) then (
result = e.(ArrayToPointerConversion).getExpr().(Literal).getValue()
) else (
result = e.toString()
)
}
from Cast c, Type cType, string cTypeName, string toStruct

View File

@@ -5,31 +5,31 @@
import cpp
predicate nameCheck(Declaration d) {
count(d.toString()) = 1 and
count(string s | d.hasName(s)) = 1 and
d.hasName(d.toString())
count(d.toString()) = 1 and
count(string s | d.hasName(s)) = 1 and
d.hasName(d.toString())
}
string accessType(Field f) {
(f.isPublic() and result = "public") or
(f.isProtected() and result = "protected") or
(f.isPrivate() and result = "private")
(f.isPublic() and result = "public") or
(f.isProtected() and result = "protected") or
(f.isPrivate() and result = "private")
}
string fieldType(Field f) {
result = f.getType().getAQlClass() and
(
result.matches("%Type") or
result = "Enum"
)
result = f.getType().getAQlClass() and
(
result.matches("%Type") or
result = "Enum"
)
}
string pointedType(Field f) {
if f.getType() instanceof PointerType then (
result = f.getType().(PointerType).getBaseType().toString()
) else (
result = ""
)
if f.getType() instanceof PointerType then (
result = f.getType().(PointerType).getBaseType().toString()
) else (
result = ""
)
}
from Class c, Field f