mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 528196: Ignore cv qualifier for UDL operator lookup
Change-Id: If8567c96d8dedfbc4b5ffd7e67db074f1fe48ca2 Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
This commit is contained in:
parent
b07df3a4fc
commit
89820bf95d
2 changed files with 85 additions and 1 deletions
|
@ -11928,6 +11928,90 @@ public class AST2CPPTests extends AST2CPPTestBase {
|
|||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * const s, unsigned long sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_1a() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * volatile s, unsigned long sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_1b() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * const volatile s, unsigned long sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_1c() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * s, unsigned long const sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_2a() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * s, unsigned long volatile sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_2b() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const * s, unsigned long const volatile sz) { return Ret(); }
|
||||
// auto test = "123"_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_2c() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(unsigned long long const) { return Ret(); }
|
||||
// auto test = 10_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_3a() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(unsigned long long volatile) { return Ret(); }
|
||||
// auto test = 10_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_3b() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(unsigned long long const volatile) { return Ret(); }
|
||||
// auto test = 10_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_3c() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const) { return Ret(); }
|
||||
// auto test = 'a'_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_4a() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char volatile) { return Ret(); }
|
||||
// auto test = 'a'_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_4b() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(char const volatile) { return Ret(); }
|
||||
// auto test = 'a'_X;
|
||||
public void testUserDefinedLiteralConcatenation_528196_4c() throws Exception {
|
||||
checkUserDefinedLiteralIsRet(getAboveComment());
|
||||
}
|
||||
|
||||
// class Ret {};
|
||||
// Ret operator "" _X(const char* s, unsigned sz) { return Ret(); }
|
||||
// Ret operator "" _Y(const char* s, unsigned sz) { return Ret(); }
|
||||
|
|
|
@ -3302,7 +3302,7 @@ public class CPPSemantics {
|
|||
} else if (kind == IASTLiteralExpression.lk_float_constant) {
|
||||
type = new CPPBasicType(Kind.eDouble, IBasicType.IS_LONG);
|
||||
}
|
||||
return func.getParameters()[0].getType().isSameType(type);
|
||||
return SemanticUtil.getNestedType(func.getParameters()[0].getType(), CVTYPE).isSameType(type);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue