[llvm] c4b7a1d - [OpenMP] Context selector extensions for return value overloading
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 11:40:00 PDT 2020
Author: Johannes Doerfert
Date: 2020-09-16T13:37:09-05:00
New Revision: c4b7a1da9d872ed075ce99c80a90b11a135577a0
URL: https://github.com/llvm/llvm-project/commit/c4b7a1da9d872ed075ce99c80a90b11a135577a0
DIFF: https://github.com/llvm/llvm-project/commit/c4b7a1da9d872ed075ce99c80a90b11a135577a0.diff
LOG: [OpenMP] Context selector extensions for return value overloading
This extension allows to declare variants in between `omp begin/end
declare variant` that do not match the type of the existing function
with that name. Without this extension we would not find a base function
(with a compatible type), therefore create a new one, which would
cause conflicting declarations. With this extension we will not create
"missing" base functions, which basically renders these specializations
harmless. They will be generated but never called.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D85878
Added:
clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c
Modified:
clang/include/clang/AST/OpenMPClause.h
clang/include/clang/Basic/AttrDocs.td
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
Removed:
################################################################################
diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h
index 35ab8ff39efa..d101fcf214b5 100644
--- a/clang/include/clang/AST/OpenMPClause.h
+++ b/clang/include/clang/AST/OpenMPClause.h
@@ -7856,6 +7856,23 @@ class OMPTraitInfo {
/// Return a string representation identifying this context selector.
std::string getMangledName() const;
+ /// Check the extension trait \p TP is active.
+ bool isExtensionActive(llvm::omp::TraitProperty TP) {
+ for (const OMPTraitSet &Set : Sets) {
+ if (Set.Kind != llvm::omp::TraitSet::implementation)
+ continue;
+ for (const OMPTraitSelector &Selector : Set.Selectors) {
+ if (Selector.Kind != llvm::omp::TraitSelector::implementation_extension)
+ continue;
+ for (const OMPTraitProperty &Property : Selector.Properties) {
+ if (Property.Kind == TP)
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/// Print a human readable representation into \p OS.
void print(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const;
};
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 8706a3f4578c..e0f875a905b7 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -3678,12 +3678,18 @@ Clang provides the following context selector extensions, used via
match_all
match_any
match_none
+ disable_implicit_base
The match extensions change when the *entire* context selector is considered a
match for an OpenMP context. The default is ``all``, with ``none`` no trait in the
selector is allowed to be in the OpenMP context, with ``any`` a single trait in
both the selector and OpenMP context is sufficient. Only a single match
extension trait is allowed per context selector.
+The disable extensions remove default effects of the ``begin declare variant``
+applied to a definition. If ``disable_implicit_base`` is given, we will not
+introduce an implicit base function for a variant if no base function was
+found. The variant is still generated but will never be called, due to the
+absence of a base function and consequently calls to a base function.
}];
}
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 40124264fdb9..184dd48c391c 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -935,6 +935,10 @@ static bool checkExtensionProperty(Parser &P, SourceLocation Loc,
if (TIProperty.Kind == TraitProperty::invalid)
return false;
+ if (TIProperty.Kind ==
+ TraitProperty::implementation_extension_disable_implicit_base)
+ return true;
+
auto IsMatchExtension = [](OMPTraitProperty &TP) {
return (TP.Kind ==
llvm::omp::TraitProperty::implementation_extension_match_all ||
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index aef043b06299..36c257440a48 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -5871,6 +5871,7 @@ Sema::OMPDeclareVariantScope::OMPDeclareVariantScope(OMPTraitInfo &TI)
FunctionDecl *
Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S,
Declarator &D) {
+ OMPDeclareVariantScope &DVScope = OMPDeclareVariantScopes.back();
IdentifierInfo *BaseII = D.getIdentifier();
LookupResult Lookup(*this, DeclarationName(BaseII), D.getIdentifierLoc(),
LookupOrdinaryName);
@@ -5905,12 +5906,15 @@ Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S,
BaseFD = UDecl;
break;
}
- if (!BaseFD) {
+
+ bool UseImplicitBase = !DVScope.TI->isExtensionActive(
+ llvm::omp::TraitProperty::implementation_extension_disable_implicit_base);
+ // If no base was found we create a declaration that we use as base.
+ if (!BaseFD && UseImplicitBase) {
BaseFD = cast<FunctionDecl>(ActOnDeclarator(S, D));
BaseFD->setImplicit(true);
}
- OMPDeclareVariantScope &DVScope = OMPDeclareVariantScopes.back();
std::string MangledName;
MangledName += D.getIdentifier()->getName();
MangledName += getOpenMPVariantManglingSeparatorStr();
diff --git a/clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c b/clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c
new file mode 100644
index 000000000000..dd81e2ee98c1
--- /dev/null
+++ b/clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c
@@ -0,0 +1,401 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -DUSE_FLOAT | FileCheck %s --check-prefix=C_FLOAT
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++ -DUSE_FLOAT | FileCheck %s --check-prefix=CXX_FLOAT
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s --check-prefix=C_INT
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++ | FileCheck %s --check-prefix=CXX_INT
+// expected-no-diagnostics
+
+#ifdef __cplusplus
+#define OVERLOADABLE
+#else
+#define OVERLOADABLE __attribute__((overloadable))
+#endif
+
+#ifdef USE_FLOAT
+#define RETURN_TY float
+#define BEFORE_BASE_RETURN_VALUE 0
+#define BEFORE_VARIANT_RETURN_VALUE 1
+#define AFTER__BASE_RETURN_VALUE 1
+#define AFTER__VARIANT_RETURN_VALUE 0
+#else
+#define RETURN_TY int
+#define BEFORE_BASE_RETURN_VALUE 1
+#define BEFORE_VARIANT_RETURN_VALUE 0
+#define AFTER__BASE_RETURN_VALUE 0
+#define AFTER__VARIANT_RETURN_VALUE 1
+#endif
+
+OVERLOADABLE
+RETURN_TY also_before(void) {
+ return BEFORE_BASE_RETURN_VALUE;
+}
+OVERLOADABLE
+RETURN_TY also_before(int i) {
+ return BEFORE_BASE_RETURN_VALUE;
+}
+
+#pragma omp begin declare variant match(implementation = {extension(disable_implicit_base)})
+OVERLOADABLE
+int also_before(void) {
+ return BEFORE_VARIANT_RETURN_VALUE;
+}
+OVERLOADABLE
+int also_before(int i) {
+ return BEFORE_VARIANT_RETURN_VALUE;
+}
+
+OVERLOADABLE
+int also_after(double d) {
+ return AFTER__VARIANT_RETURN_VALUE;
+}
+OVERLOADABLE
+int also_after(long l) {
+ return AFTER__VARIANT_RETURN_VALUE;
+}
+#pragma omp end declare variant
+
+OVERLOADABLE
+RETURN_TY also_after(double d) {
+ return AFTER__BASE_RETURN_VALUE;
+}
+OVERLOADABLE
+RETURN_TY also_after(long l) {
+ return AFTER__BASE_RETURN_VALUE;
+}
+
+int main() {
+ // Should return 0.
+ return also_before() + also_before(1) + also_before(2.0f) + also_after(3.0) + also_after(4L);
+}
+
+// Make sure we see base calls in the FLOAT versions, that is no
+// PseudoObjectExpr in those. In the INT versions we want PseudoObjectExpr (=
+// variant calls) for the `*_before` functions but not the `*_after` ones
+// (first 3 vs 2 last ones).
+
+// C_FLOAT: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:30:1> line:28:11 used also_before 'float ({{.*}})'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] <col:29, line:30:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_2:0x[a-z0-9]*]] <line:29:3, line:15:34>
+// C_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_3:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_4:0x[a-z0-9]*]] <col:34> 'int' 0
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_5:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_6:0x[a-z0-9]*]] <col:22, line:34:1> line:32:11 used also_before 'float (int)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_7:0x[a-z0-9]*]] <col:23, col:27> col:27 i 'int'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_8:0x[a-z0-9]*]] <col:30, line:34:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_9:0x[a-z0-9]*]] <line:33:3, line:15:34>
+// C_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_10:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_11:0x[a-z0-9]*]] <col:34> 'int' 0
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_12:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_13:0x[a-z0-9]*]] <col:22, line:40:1> line:10:22 also_before[implementation={extension(disable_implicit_base)}] 'int ({{.*}})'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_14:0x[a-z0-9]*]] <line:38:23, line:40:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_15:0x[a-z0-9]*]] <line:39:3, line:16:37>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_16:0x[a-z0-9]*]] <col:37> 'int' 1
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_17:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_18:0x[a-z0-9]*]] <col:22, line:44:1> line:10:22 also_before[implementation={extension(disable_implicit_base)}] 'int (int)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_19:0x[a-z0-9]*]] <line:42:17, col:21> col:21 i 'int'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_20:0x[a-z0-9]*]] <col:24, line:44:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_21:0x[a-z0-9]*]] <line:43:3, line:16:37>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_22:0x[a-z0-9]*]] <col:37> 'int' 1
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_23:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_24:0x[a-z0-9]*]] <col:22, line:49:1> line:10:22 also_after[implementation={extension(disable_implicit_base)}] 'int (double)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_25:0x[a-z0-9]*]] <line:47:16, col:23> col:23 d 'double'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_26:0x[a-z0-9]*]] <col:26, line:49:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_27:0x[a-z0-9]*]] <line:48:3, line:18:37>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_28:0x[a-z0-9]*]] <col:37> 'int' 0
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_29:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_30:0x[a-z0-9]*]] <col:22, line:53:1> line:10:22 also_after[implementation={extension(disable_implicit_base)}] 'int (long)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_31:0x[a-z0-9]*]] <line:51:16, col:21> col:21 l 'long'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_32:0x[a-z0-9]*]] <col:24, line:53:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_33:0x[a-z0-9]*]] <line:52:3, line:18:37>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_34:0x[a-z0-9]*]] <col:37> 'int' 0
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_35:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_36:0x[a-z0-9]*]] <col:22, line:59:1> line:57:11 used also_after 'float (double)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_37:0x[a-z0-9]*]] <col:22, col:29> col:29 d 'double'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_38:0x[a-z0-9]*]] <col:32, line:59:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_39:0x[a-z0-9]*]] <line:58:3, line:17:34>
+// C_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_40:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_41:0x[a-z0-9]*]] <col:34> 'int' 1
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_42:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: |-FunctionDecl [[ADDR_43:0x[a-z0-9]*]] <col:22, line:63:1> line:61:11 used also_after 'float (long)'
+// C_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_44:0x[a-z0-9]*]] <col:22, col:27> col:27 l 'long'
+// C_FLOAT-NEXT: | |-CompoundStmt [[ADDR_45:0x[a-z0-9]*]] <col:30, line:63:1>
+// C_FLOAT-NEXT: | | `-ReturnStmt [[ADDR_46:0x[a-z0-9]*]] <line:62:3, line:17:34>
+// C_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_47:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// C_FLOAT-NEXT: | | `-IntegerLiteral [[ADDR_48:0x[a-z0-9]*]] <col:34> 'int' 1
+// C_FLOAT-NEXT: | `-OverloadableAttr [[ADDR_49:0x[a-z0-9]*]] <line:10:37>
+// C_FLOAT-NEXT: `-FunctionDecl [[ADDR_50:0x[a-z0-9]*]] <line:65:1, line:68:1> line:65:5 main 'int ({{.*}})'
+// C_FLOAT-NEXT: `-CompoundStmt [[ADDR_51:0x[a-z0-9]*]] <col:12, line:68:1>
+// C_FLOAT-NEXT: `-ReturnStmt [[ADDR_52:0x[a-z0-9]*]] <line:67:3, col:94>
+// C_FLOAT-NEXT: `-ImplicitCastExpr [[ADDR_53:0x[a-z0-9]*]] <col:10, col:94> 'int' <FloatingToIntegral>
+// C_FLOAT-NEXT: `-BinaryOperator [[ADDR_54:0x[a-z0-9]*]] <col:10, col:94> 'float' '+'
+// C_FLOAT-NEXT: |-BinaryOperator [[ADDR_55:0x[a-z0-9]*]] <col:10, col:77> 'float' '+'
+// C_FLOAT-NEXT: | |-BinaryOperator [[ADDR_56:0x[a-z0-9]*]] <col:10, col:59> 'float' '+'
+// C_FLOAT-NEXT: | | |-BinaryOperator [[ADDR_57:0x[a-z0-9]*]] <col:10, col:39> 'float' '+'
+// C_FLOAT-NEXT: | | | |-CallExpr [[ADDR_58:0x[a-z0-9]*]] <col:10, col:22> 'float'
+// C_FLOAT-NEXT: | | | | `-ImplicitCastExpr [[ADDR_59:0x[a-z0-9]*]] <col:10> 'float (*)({{.*}})' <FunctionToPointerDecay>
+// C_FLOAT-NEXT: | | | | `-DeclRefExpr [[ADDR_60:0x[a-z0-9]*]] <col:10> 'float ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'float ({{.*}})'
+// C_FLOAT-NEXT: | | | `-CallExpr [[ADDR_61:0x[a-z0-9]*]] <col:26, col:39> 'float'
+// C_FLOAT-NEXT: | | | |-ImplicitCastExpr [[ADDR_62:0x[a-z0-9]*]] <col:26> 'float (*)(int)' <FunctionToPointerDecay>
+// C_FLOAT-NEXT: | | | | `-DeclRefExpr [[ADDR_63:0x[a-z0-9]*]] <col:26> 'float (int)' {{.*}}Function [[ADDR_6]] 'also_before' 'float (int)'
+// C_FLOAT-NEXT: | | | `-IntegerLiteral [[ADDR_64:0x[a-z0-9]*]] <col:38> 'int' 1
+// C_FLOAT-NEXT: | | `-CallExpr [[ADDR_65:0x[a-z0-9]*]] <col:43, col:59> 'float'
+// C_FLOAT-NEXT: | | |-ImplicitCastExpr [[ADDR_66:0x[a-z0-9]*]] <col:43> 'float (*)(int)' <FunctionToPointerDecay>
+// C_FLOAT-NEXT: | | | `-DeclRefExpr [[ADDR_67:0x[a-z0-9]*]] <col:43> 'float (int)' {{.*}}Function [[ADDR_6]] 'also_before' 'float (int)'
+// C_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_68:0x[a-z0-9]*]] <col:55> 'int' <FloatingToIntegral>
+// C_FLOAT-NEXT: | | `-FloatingLiteral [[ADDR_69:0x[a-z0-9]*]] <col:55> 'float' 2.000000e+00
+// C_FLOAT-NEXT: | `-CallExpr [[ADDR_70:0x[a-z0-9]*]] <col:63, col:77> 'float'
+// C_FLOAT-NEXT: | |-ImplicitCastExpr [[ADDR_71:0x[a-z0-9]*]] <col:63> 'float (*)(double)' <FunctionToPointerDecay>
+// C_FLOAT-NEXT: | | `-DeclRefExpr [[ADDR_72:0x[a-z0-9]*]] <col:63> 'float (double)' {{.*}}Function [[ADDR_36]] 'also_after' 'float (double)'
+// C_FLOAT-NEXT: | `-FloatingLiteral [[ADDR_73:0x[a-z0-9]*]] <col:74> 'double' 3.000000e+00
+// C_FLOAT-NEXT: `-CallExpr [[ADDR_74:0x[a-z0-9]*]] <col:81, col:94> 'float'
+// C_FLOAT-NEXT: |-ImplicitCastExpr [[ADDR_75:0x[a-z0-9]*]] <col:81> 'float (*)(long)' <FunctionToPointerDecay>
+// C_FLOAT-NEXT: | `-DeclRefExpr [[ADDR_76:0x[a-z0-9]*]] <col:81> 'float (long)' {{.*}}Function [[ADDR_43]] 'also_after' 'float (long)'
+// C_FLOAT-NEXT: `-IntegerLiteral [[ADDR_77:0x[a-z0-9]*]] <col:92> 'long' 4
+
+// CXX_FLOAT: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:30:1> line:28:11 used also_before 'float ({{.*}})'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] <col:29, line:30:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_2:0x[a-z0-9]*]] <line:29:3, line:15:34>
+// CXX_FLOAT-NEXT: | `-ImplicitCastExpr [[ADDR_3:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_4:0x[a-z0-9]*]] <col:34> 'int' 0
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_5:0x[a-z0-9]*]] <line:14:19, line:34:1> line:32:11 used also_before 'float (int)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_6:0x[a-z0-9]*]] <col:23, col:27> col:27 i 'int'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_7:0x[a-z0-9]*]] <col:30, line:34:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_8:0x[a-z0-9]*]] <line:33:3, line:15:34>
+// CXX_FLOAT-NEXT: | `-ImplicitCastExpr [[ADDR_9:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_10:0x[a-z0-9]*]] <col:34> 'int' 0
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_11:0x[a-z0-9]*]] <line:38:1, line:40:1> line:38:1 also_before[implementation={extension(disable_implicit_base)}] 'int ({{.*}})'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_12:0x[a-z0-9]*]] <col:23, line:40:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_13:0x[a-z0-9]*]] <line:39:3, line:16:37>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_14:0x[a-z0-9]*]] <col:37> 'int' 1
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_15:0x[a-z0-9]*]] <line:42:1, line:44:1> line:42:1 also_before[implementation={extension(disable_implicit_base)}] 'int (int)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_16:0x[a-z0-9]*]] <col:17, col:21> col:21 i 'int'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_17:0x[a-z0-9]*]] <col:24, line:44:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_18:0x[a-z0-9]*]] <line:43:3, line:16:37>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_19:0x[a-z0-9]*]] <col:37> 'int' 1
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_20:0x[a-z0-9]*]] <line:47:1, line:49:1> line:47:1 also_after[implementation={extension(disable_implicit_base)}] 'int (double)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_21:0x[a-z0-9]*]] <col:16, col:23> col:23 d 'double'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_22:0x[a-z0-9]*]] <col:26, line:49:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_23:0x[a-z0-9]*]] <line:48:3, line:18:37>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_24:0x[a-z0-9]*]] <col:37> 'int' 0
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_25:0x[a-z0-9]*]] <line:51:1, line:53:1> line:51:1 also_after[implementation={extension(disable_implicit_base)}] 'int (long)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_26:0x[a-z0-9]*]] <col:16, col:21> col:21 l 'long'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_27:0x[a-z0-9]*]] <col:24, line:53:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_28:0x[a-z0-9]*]] <line:52:3, line:18:37>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_29:0x[a-z0-9]*]] <col:37> 'int' 0
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_30:0x[a-z0-9]*]] <line:14:19, line:59:1> line:57:11 used also_after 'float (double)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_31:0x[a-z0-9]*]] <col:22, col:29> col:29 d 'double'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_32:0x[a-z0-9]*]] <col:32, line:59:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_33:0x[a-z0-9]*]] <line:58:3, line:17:34>
+// CXX_FLOAT-NEXT: | `-ImplicitCastExpr [[ADDR_34:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_35:0x[a-z0-9]*]] <col:34> 'int' 1
+// CXX_FLOAT-NEXT: |-FunctionDecl [[ADDR_36:0x[a-z0-9]*]] <line:14:19, line:63:1> line:61:11 used also_after 'float (long)'
+// CXX_FLOAT-NEXT: | |-ParmVarDecl [[ADDR_37:0x[a-z0-9]*]] <col:22, col:27> col:27 l 'long'
+// CXX_FLOAT-NEXT: | `-CompoundStmt [[ADDR_38:0x[a-z0-9]*]] <col:30, line:63:1>
+// CXX_FLOAT-NEXT: | `-ReturnStmt [[ADDR_39:0x[a-z0-9]*]] <line:62:3, line:17:34>
+// CXX_FLOAT-NEXT: | `-ImplicitCastExpr [[ADDR_40:0x[a-z0-9]*]] <col:34> 'float' <IntegralToFloating>
+// CXX_FLOAT-NEXT: | `-IntegerLiteral [[ADDR_41:0x[a-z0-9]*]] <col:34> 'int' 1
+// CXX_FLOAT-NEXT: `-FunctionDecl [[ADDR_42:0x[a-z0-9]*]] <line:65:1, line:68:1> line:65:5 main 'int ({{.*}})'
+// CXX_FLOAT-NEXT: `-CompoundStmt [[ADDR_43:0x[a-z0-9]*]] <col:12, line:68:1>
+// CXX_FLOAT-NEXT: `-ReturnStmt [[ADDR_44:0x[a-z0-9]*]] <line:67:3, col:94>
+// CXX_FLOAT-NEXT: `-ImplicitCastExpr [[ADDR_45:0x[a-z0-9]*]] <col:10, col:94> 'int' <FloatingToIntegral>
+// CXX_FLOAT-NEXT: `-BinaryOperator [[ADDR_46:0x[a-z0-9]*]] <col:10, col:94> 'float' '+'
+// CXX_FLOAT-NEXT: |-BinaryOperator [[ADDR_47:0x[a-z0-9]*]] <col:10, col:77> 'float' '+'
+// CXX_FLOAT-NEXT: | |-BinaryOperator [[ADDR_48:0x[a-z0-9]*]] <col:10, col:59> 'float' '+'
+// CXX_FLOAT-NEXT: | | |-BinaryOperator [[ADDR_49:0x[a-z0-9]*]] <col:10, col:39> 'float' '+'
+// CXX_FLOAT-NEXT: | | | |-CallExpr [[ADDR_50:0x[a-z0-9]*]] <col:10, col:22> 'float'
+// CXX_FLOAT-NEXT: | | | | `-ImplicitCastExpr [[ADDR_51:0x[a-z0-9]*]] <col:10> 'float (*)({{.*}})' <FunctionToPointerDecay>
+// CXX_FLOAT-NEXT: | | | | `-DeclRefExpr [[ADDR_52:0x[a-z0-9]*]] <col:10> 'float ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'float ({{.*}})'
+// CXX_FLOAT-NEXT: | | | `-CallExpr [[ADDR_53:0x[a-z0-9]*]] <col:26, col:39> 'float'
+// CXX_FLOAT-NEXT: | | | |-ImplicitCastExpr [[ADDR_54:0x[a-z0-9]*]] <col:26> 'float (*)(int)' <FunctionToPointerDecay>
+// CXX_FLOAT-NEXT: | | | | `-DeclRefExpr [[ADDR_55:0x[a-z0-9]*]] <col:26> 'float (int)' {{.*}}Function [[ADDR_5]] 'also_before' 'float (int)'
+// CXX_FLOAT-NEXT: | | | `-IntegerLiteral [[ADDR_56:0x[a-z0-9]*]] <col:38> 'int' 1
+// CXX_FLOAT-NEXT: | | `-CallExpr [[ADDR_57:0x[a-z0-9]*]] <col:43, col:59> 'float'
+// CXX_FLOAT-NEXT: | | |-ImplicitCastExpr [[ADDR_58:0x[a-z0-9]*]] <col:43> 'float (*)(int)' <FunctionToPointerDecay>
+// CXX_FLOAT-NEXT: | | | `-DeclRefExpr [[ADDR_59:0x[a-z0-9]*]] <col:43> 'float (int)' {{.*}}Function [[ADDR_5]] 'also_before' 'float (int)'
+// CXX_FLOAT-NEXT: | | `-ImplicitCastExpr [[ADDR_60:0x[a-z0-9]*]] <col:55> 'int' <FloatingToIntegral>
+// CXX_FLOAT-NEXT: | | `-FloatingLiteral [[ADDR_61:0x[a-z0-9]*]] <col:55> 'float' 2.000000e+00
+// CXX_FLOAT-NEXT: | `-CallExpr [[ADDR_62:0x[a-z0-9]*]] <col:63, col:77> 'float'
+// CXX_FLOAT-NEXT: | |-ImplicitCastExpr [[ADDR_63:0x[a-z0-9]*]] <col:63> 'float (*)(double)' <FunctionToPointerDecay>
+// CXX_FLOAT-NEXT: | | `-DeclRefExpr [[ADDR_64:0x[a-z0-9]*]] <col:63> 'float (double)' {{.*}}Function [[ADDR_30]] 'also_after' 'float (double)'
+// CXX_FLOAT-NEXT: | `-FloatingLiteral [[ADDR_65:0x[a-z0-9]*]] <col:74> 'double' 3.000000e+00
+// CXX_FLOAT-NEXT: `-CallExpr [[ADDR_66:0x[a-z0-9]*]] <col:81, col:94> 'float'
+// CXX_FLOAT-NEXT: |-ImplicitCastExpr [[ADDR_67:0x[a-z0-9]*]] <col:81> 'float (*)(long)' <FunctionToPointerDecay>
+// CXX_FLOAT-NEXT: | `-DeclRefExpr [[ADDR_68:0x[a-z0-9]*]] <col:81> 'float (long)' {{.*}}Function [[ADDR_36]] 'also_after' 'float (long)'
+// CXX_FLOAT-NEXT: `-IntegerLiteral [[ADDR_69:0x[a-z0-9]*]] <col:92> 'long' 4
+
+// C_INT: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:30:1> line:28:11 used also_before 'int ({{.*}})'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] <col:29, line:30:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_2:0x[a-z0-9]*]] <line:29:3, line:21:34>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_3:0x[a-z0-9]*]] <col:34> 'int' 1
+// C_INT-NEXT: | |-OverloadableAttr [[ADDR_4:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: | `-OMPDeclareVariantAttr [[ADDR_5:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(disable_implicit_base)}
+// C_INT-NEXT: | `-DeclRefExpr [[ADDR_6:0x[a-z0-9]*]] <col:22> 'int ({{.*}})' Function [[ADDR_7:0x[a-z0-9]*]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int ({{.*}})'
+// C_INT-NEXT: |-FunctionDecl [[ADDR_8:0x[a-z0-9]*]] <col:22, line:34:1> line:32:11 used also_before 'int (int)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_9:0x[a-z0-9]*]] <col:23, col:27> col:27 i 'int'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_10:0x[a-z0-9]*]] <col:30, line:34:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_11:0x[a-z0-9]*]] <line:33:3, line:21:34>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_12:0x[a-z0-9]*]] <col:34> 'int' 1
+// C_INT-NEXT: | |-OverloadableAttr [[ADDR_13:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: | `-OMPDeclareVariantAttr [[ADDR_14:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(disable_implicit_base)}
+// C_INT-NEXT: | `-DeclRefExpr [[ADDR_15:0x[a-z0-9]*]] <col:22> 'int (int)' Function [[ADDR_16:0x[a-z0-9]*]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// C_INT-NEXT: |-FunctionDecl [[ADDR_7]] <col:22, line:40:1> line:10:22 also_before[implementation={extension(disable_implicit_base)}] 'int ({{.*}})'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_17:0x[a-z0-9]*]] <line:38:23, line:40:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_18:0x[a-z0-9]*]] <line:39:3, line:22:37>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_19:0x[a-z0-9]*]] <col:37> 'int' 0
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_20:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: |-FunctionDecl [[ADDR_16]] <col:22, line:44:1> line:10:22 also_before[implementation={extension(disable_implicit_base)}] 'int (int)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_21:0x[a-z0-9]*]] <line:42:17, col:21> col:21 i 'int'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_22:0x[a-z0-9]*]] <col:24, line:44:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_23:0x[a-z0-9]*]] <line:43:3, line:22:37>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_24:0x[a-z0-9]*]] <col:37> 'int' 0
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_25:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: |-FunctionDecl [[ADDR_26:0x[a-z0-9]*]] <col:22, line:49:1> line:10:22 also_after[implementation={extension(disable_implicit_base)}] 'int (double)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_27:0x[a-z0-9]*]] <line:47:16, col:23> col:23 d 'double'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_28:0x[a-z0-9]*]] <col:26, line:49:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_29:0x[a-z0-9]*]] <line:48:3, line:24:37>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_30:0x[a-z0-9]*]] <col:37> 'int' 1
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_31:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: |-FunctionDecl [[ADDR_32:0x[a-z0-9]*]] <col:22, line:53:1> line:10:22 also_after[implementation={extension(disable_implicit_base)}] 'int (long)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_33:0x[a-z0-9]*]] <line:51:16, col:21> col:21 l 'long'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_34:0x[a-z0-9]*]] <col:24, line:53:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_35:0x[a-z0-9]*]] <line:52:3, line:24:37>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:37> 'int' 1
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_37:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: |-FunctionDecl [[ADDR_38:0x[a-z0-9]*]] <col:22, line:59:1> line:57:11 used also_after 'int (double)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_39:0x[a-z0-9]*]] <col:22, col:29> col:29 d 'double'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_40:0x[a-z0-9]*]] <col:32, line:59:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_41:0x[a-z0-9]*]] <line:58:3, line:23:34>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_42:0x[a-z0-9]*]] <col:34> 'int' 0
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_43:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: |-FunctionDecl [[ADDR_44:0x[a-z0-9]*]] <col:22, line:63:1> line:61:11 used also_after 'int (long)'
+// C_INT-NEXT: | |-ParmVarDecl [[ADDR_45:0x[a-z0-9]*]] <col:22, col:27> col:27 l 'long'
+// C_INT-NEXT: | |-CompoundStmt [[ADDR_46:0x[a-z0-9]*]] <col:30, line:63:1>
+// C_INT-NEXT: | | `-ReturnStmt [[ADDR_47:0x[a-z0-9]*]] <line:62:3, line:23:34>
+// C_INT-NEXT: | | `-IntegerLiteral [[ADDR_48:0x[a-z0-9]*]] <col:34> 'int' 0
+// C_INT-NEXT: | `-OverloadableAttr [[ADDR_49:0x[a-z0-9]*]] <line:10:37>
+// C_INT-NEXT: `-FunctionDecl [[ADDR_50:0x[a-z0-9]*]] <line:65:1, line:68:1> line:65:5 main 'int ({{.*}})'
+// C_INT-NEXT: `-CompoundStmt [[ADDR_51:0x[a-z0-9]*]] <col:12, line:68:1>
+// C_INT-NEXT: `-ReturnStmt [[ADDR_52:0x[a-z0-9]*]] <line:67:3, col:94>
+// C_INT-NEXT: `-BinaryOperator [[ADDR_53:0x[a-z0-9]*]] <col:10, col:94> 'int' '+'
+// C_INT-NEXT: |-BinaryOperator [[ADDR_54:0x[a-z0-9]*]] <col:10, col:77> 'int' '+'
+// C_INT-NEXT: | |-BinaryOperator [[ADDR_55:0x[a-z0-9]*]] <col:10, col:59> 'int' '+'
+// C_INT-NEXT: | | |-BinaryOperator [[ADDR_56:0x[a-z0-9]*]] <col:10, col:39> 'int' '+'
+// C_INT-NEXT: | | | |-PseudoObjectExpr [[ADDR_57:0x[a-z0-9]*]] <col:10, col:22> 'int'
+// C_INT-NEXT: | | | | |-CallExpr [[ADDR_58:0x[a-z0-9]*]] <col:10, col:22> 'int'
+// C_INT-NEXT: | | | | | `-ImplicitCastExpr [[ADDR_59:0x[a-z0-9]*]] <col:10> 'int (*)({{.*}})' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | | | `-DeclRefExpr [[ADDR_60:0x[a-z0-9]*]] <col:10> 'int ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'int ({{.*}})'
+// C_INT-NEXT: | | | | `-CallExpr [[ADDR_61:0x[a-z0-9]*]] <line:10:22, line:67:22> 'int'
+// C_INT-NEXT: | | | | `-ImplicitCastExpr [[ADDR_62:0x[a-z0-9]*]] <line:10:22> 'int (*)({{.*}})' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_6]] <col:22> 'int ({{.*}})' Function [[ADDR_7]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int ({{.*}})'
+// C_INT-NEXT: | | | `-PseudoObjectExpr [[ADDR_63:0x[a-z0-9]*]] <line:67:26, col:39> 'int'
+// C_INT-NEXT: | | | |-CallExpr [[ADDR_64:0x[a-z0-9]*]] <col:26, col:39> 'int'
+// C_INT-NEXT: | | | | |-ImplicitCastExpr [[ADDR_65:0x[a-z0-9]*]] <col:26> 'int (*)(int)' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | | | `-DeclRefExpr [[ADDR_66:0x[a-z0-9]*]] <col:26> 'int (int)' {{.*}}Function [[ADDR_8]] 'also_before' 'int (int)'
+// C_INT-NEXT: | | | | `-IntegerLiteral [[ADDR_67:0x[a-z0-9]*]] <col:38> 'int' 1
+// C_INT-NEXT: | | | `-CallExpr [[ADDR_68:0x[a-z0-9]*]] <line:10:22, line:67:39> 'int'
+// C_INT-NEXT: | | | |-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] <line:10:22> 'int (*)(int)' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_15]] <col:22> 'int (int)' Function [[ADDR_16]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// C_INT-NEXT: | | | `-IntegerLiteral [[ADDR_67]] <line:67:38> 'int' 1
+// C_INT-NEXT: | | `-PseudoObjectExpr [[ADDR_70:0x[a-z0-9]*]] <col:43, col:59> 'int'
+// C_INT-NEXT: | | |-CallExpr [[ADDR_71:0x[a-z0-9]*]] <col:43, col:59> 'int'
+// C_INT-NEXT: | | | |-ImplicitCastExpr [[ADDR_72:0x[a-z0-9]*]] <col:43> 'int (*)(int)' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_73:0x[a-z0-9]*]] <col:43> 'int (int)' {{.*}}Function [[ADDR_8]] 'also_before' 'int (int)'
+// C_INT-NEXT: | | | `-ImplicitCastExpr [[ADDR_74:0x[a-z0-9]*]] <col:55> 'int' <FloatingToIntegral>
+// C_INT-NEXT: | | | `-FloatingLiteral [[ADDR_75:0x[a-z0-9]*]] <col:55> 'float' 2.000000e+00
+// C_INT-NEXT: | | `-CallExpr [[ADDR_76:0x[a-z0-9]*]] <line:10:22, line:67:59> 'int'
+// C_INT-NEXT: | | |-ImplicitCastExpr [[ADDR_77:0x[a-z0-9]*]] <line:10:22> 'int (*)(int)' <FunctionToPointerDecay>
+// C_INT-NEXT: | | | `-DeclRefExpr [[ADDR_15]] <col:22> 'int (int)' Function [[ADDR_16]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// C_INT-NEXT: | | `-ImplicitCastExpr [[ADDR_78:0x[a-z0-9]*]] <line:67:55> 'int' <FloatingToIntegral>
+// C_INT-NEXT: | | `-FloatingLiteral [[ADDR_75]] <col:55> 'float' 2.000000e+00
+// C_INT-NEXT: | `-CallExpr [[ADDR_79:0x[a-z0-9]*]] <col:63, col:77> 'int'
+// C_INT-NEXT: | |-ImplicitCastExpr [[ADDR_80:0x[a-z0-9]*]] <col:63> 'int (*)(double)' <FunctionToPointerDecay>
+// C_INT-NEXT: | | `-DeclRefExpr [[ADDR_81:0x[a-z0-9]*]] <col:63> 'int (double)' {{.*}}Function [[ADDR_38]] 'also_after' 'int (double)'
+// C_INT-NEXT: | `-FloatingLiteral [[ADDR_82:0x[a-z0-9]*]] <col:74> 'double' 3.000000e+00
+// C_INT-NEXT: `-CallExpr [[ADDR_83:0x[a-z0-9]*]] <col:81, col:94> 'int'
+// C_INT-NEXT: |-ImplicitCastExpr [[ADDR_84:0x[a-z0-9]*]] <col:81> 'int (*)(long)' <FunctionToPointerDecay>
+// C_INT-NEXT: | `-DeclRefExpr [[ADDR_85:0x[a-z0-9]*]] <col:81> 'int (long)' {{.*}}Function [[ADDR_44]] 'also_after' 'int (long)'
+// C_INT-NEXT: `-IntegerLiteral [[ADDR_86:0x[a-z0-9]*]] <col:92> 'long' 4
+
+// CXX_INT: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:30:1> line:28:11 used also_before 'int ({{.*}})'
+// CXX_INT-NEXT: | |-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] <col:29, line:30:1>
+// CXX_INT-NEXT: | | `-ReturnStmt [[ADDR_2:0x[a-z0-9]*]] <line:29:3, line:21:34>
+// CXX_INT-NEXT: | | `-IntegerLiteral [[ADDR_3:0x[a-z0-9]*]] <col:34> 'int' 1
+// CXX_INT-NEXT: | `-OMPDeclareVariantAttr [[ADDR_4:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(disable_implicit_base)}
+// CXX_INT-NEXT: | `-DeclRefExpr [[ADDR_5:0x[a-z0-9]*]] <line:38:1> 'int ({{.*}})' Function [[ADDR_6:0x[a-z0-9]*]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int ({{.*}})'
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_7:0x[a-z0-9]*]] <line:20:19, line:34:1> line:32:11 used also_before 'int (int)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_8:0x[a-z0-9]*]] <col:23, col:27> col:27 i 'int'
+// CXX_INT-NEXT: | |-CompoundStmt [[ADDR_9:0x[a-z0-9]*]] <col:30, line:34:1>
+// CXX_INT-NEXT: | | `-ReturnStmt [[ADDR_10:0x[a-z0-9]*]] <line:33:3, line:21:34>
+// CXX_INT-NEXT: | | `-IntegerLiteral [[ADDR_11:0x[a-z0-9]*]] <col:34> 'int' 1
+// CXX_INT-NEXT: | `-OMPDeclareVariantAttr [[ADDR_12:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(disable_implicit_base)}
+// CXX_INT-NEXT: | `-DeclRefExpr [[ADDR_13:0x[a-z0-9]*]] <line:42:1> 'int (int)' Function [[ADDR_14:0x[a-z0-9]*]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_6]] <line:38:1, line:40:1> line:38:1 also_before[implementation={extension(disable_implicit_base)}] 'int ({{.*}})'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_15:0x[a-z0-9]*]] <col:23, line:40:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_16:0x[a-z0-9]*]] <line:39:3, line:22:37>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_17:0x[a-z0-9]*]] <col:37> 'int' 0
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_14]] <line:42:1, line:44:1> line:42:1 also_before[implementation={extension(disable_implicit_base)}] 'int (int)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_18:0x[a-z0-9]*]] <col:17, col:21> col:21 i 'int'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_19:0x[a-z0-9]*]] <col:24, line:44:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_20:0x[a-z0-9]*]] <line:43:3, line:22:37>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_21:0x[a-z0-9]*]] <col:37> 'int' 0
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_22:0x[a-z0-9]*]] <line:47:1, line:49:1> line:47:1 also_after[implementation={extension(disable_implicit_base)}] 'int (double)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_23:0x[a-z0-9]*]] <col:16, col:23> col:23 d 'double'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_24:0x[a-z0-9]*]] <col:26, line:49:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_25:0x[a-z0-9]*]] <line:48:3, line:24:37>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_26:0x[a-z0-9]*]] <col:37> 'int' 1
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_27:0x[a-z0-9]*]] <line:51:1, line:53:1> line:51:1 also_after[implementation={extension(disable_implicit_base)}] 'int (long)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_28:0x[a-z0-9]*]] <col:16, col:21> col:21 l 'long'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] <col:24, line:53:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_30:0x[a-z0-9]*]] <line:52:3, line:24:37>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_31:0x[a-z0-9]*]] <col:37> 'int' 1
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_32:0x[a-z0-9]*]] <line:20:19, line:59:1> line:57:11 used also_after 'int (double)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_33:0x[a-z0-9]*]] <col:22, col:29> col:29 d 'double'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_34:0x[a-z0-9]*]] <col:32, line:59:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_35:0x[a-z0-9]*]] <line:58:3, line:23:34>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:34> 'int' 0
+// CXX_INT-NEXT: |-FunctionDecl [[ADDR_37:0x[a-z0-9]*]] <line:20:19, line:63:1> line:61:11 used also_after 'int (long)'
+// CXX_INT-NEXT: | |-ParmVarDecl [[ADDR_38:0x[a-z0-9]*]] <col:22, col:27> col:27 l 'long'
+// CXX_INT-NEXT: | `-CompoundStmt [[ADDR_39:0x[a-z0-9]*]] <col:30, line:63:1>
+// CXX_INT-NEXT: | `-ReturnStmt [[ADDR_40:0x[a-z0-9]*]] <line:62:3, line:23:34>
+// CXX_INT-NEXT: | `-IntegerLiteral [[ADDR_41:0x[a-z0-9]*]] <col:34> 'int' 0
+// CXX_INT-NEXT: `-FunctionDecl [[ADDR_42:0x[a-z0-9]*]] <line:65:1, line:68:1> line:65:5 main 'int ({{.*}})'
+// CXX_INT-NEXT: `-CompoundStmt [[ADDR_43:0x[a-z0-9]*]] <col:12, line:68:1>
+// CXX_INT-NEXT: `-ReturnStmt [[ADDR_44:0x[a-z0-9]*]] <line:67:3, col:94>
+// CXX_INT-NEXT: `-BinaryOperator [[ADDR_45:0x[a-z0-9]*]] <col:10, col:94> 'int' '+'
+// CXX_INT-NEXT: |-BinaryOperator [[ADDR_46:0x[a-z0-9]*]] <col:10, col:77> 'int' '+'
+// CXX_INT-NEXT: | |-BinaryOperator [[ADDR_47:0x[a-z0-9]*]] <col:10, col:59> 'int' '+'
+// CXX_INT-NEXT: | | |-BinaryOperator [[ADDR_48:0x[a-z0-9]*]] <col:10, col:39> 'int' '+'
+// CXX_INT-NEXT: | | | |-PseudoObjectExpr [[ADDR_49:0x[a-z0-9]*]] <col:10, col:22> 'int'
+// CXX_INT-NEXT: | | | | |-CallExpr [[ADDR_50:0x[a-z0-9]*]] <col:10, col:22> 'int'
+// CXX_INT-NEXT: | | | | | `-ImplicitCastExpr [[ADDR_51:0x[a-z0-9]*]] <col:10> 'int (*)({{.*}})' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | | | `-DeclRefExpr [[ADDR_52:0x[a-z0-9]*]] <col:10> 'int ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'int ({{.*}})'
+// CXX_INT-NEXT: | | | | `-CallExpr [[ADDR_53:0x[a-z0-9]*]] <line:38:1, line:67:22> 'int'
+// CXX_INT-NEXT: | | | | `-ImplicitCastExpr [[ADDR_54:0x[a-z0-9]*]] <line:38:1> 'int (*)({{.*}})' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_5]] <col:1> 'int ({{.*}})' Function [[ADDR_6]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int ({{.*}})'
+// CXX_INT-NEXT: | | | `-PseudoObjectExpr [[ADDR_55:0x[a-z0-9]*]] <line:67:26, col:39> 'int'
+// CXX_INT-NEXT: | | | |-CallExpr [[ADDR_56:0x[a-z0-9]*]] <col:26, col:39> 'int'
+// CXX_INT-NEXT: | | | | |-ImplicitCastExpr [[ADDR_57:0x[a-z0-9]*]] <col:26> 'int (*)(int)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | | | `-DeclRefExpr [[ADDR_58:0x[a-z0-9]*]] <col:26> 'int (int)' {{.*}}Function [[ADDR_7]] 'also_before' 'int (int)'
+// CXX_INT-NEXT: | | | | `-IntegerLiteral [[ADDR_59:0x[a-z0-9]*]] <col:38> 'int' 1
+// CXX_INT-NEXT: | | | `-CallExpr [[ADDR_60:0x[a-z0-9]*]] <line:42:1, line:67:39> 'int'
+// CXX_INT-NEXT: | | | |-ImplicitCastExpr [[ADDR_61:0x[a-z0-9]*]] <line:42:1> 'int (*)(int)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_13]] <col:1> 'int (int)' Function [[ADDR_14]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// CXX_INT-NEXT: | | | `-IntegerLiteral [[ADDR_59]] <line:67:38> 'int' 1
+// CXX_INT-NEXT: | | `-PseudoObjectExpr [[ADDR_62:0x[a-z0-9]*]] <col:43, col:59> 'int'
+// CXX_INT-NEXT: | | |-CallExpr [[ADDR_63:0x[a-z0-9]*]] <col:43, col:59> 'int'
+// CXX_INT-NEXT: | | | |-ImplicitCastExpr [[ADDR_64:0x[a-z0-9]*]] <col:43> 'int (*)(int)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | | `-DeclRefExpr [[ADDR_65:0x[a-z0-9]*]] <col:43> 'int (int)' {{.*}}Function [[ADDR_7]] 'also_before' 'int (int)'
+// CXX_INT-NEXT: | | | `-ImplicitCastExpr [[ADDR_66:0x[a-z0-9]*]] <col:55> 'int' <FloatingToIntegral>
+// CXX_INT-NEXT: | | | `-FloatingLiteral [[ADDR_67:0x[a-z0-9]*]] <col:55> 'float' 2.000000e+00
+// CXX_INT-NEXT: | | `-CallExpr [[ADDR_68:0x[a-z0-9]*]] <line:42:1, line:67:59> 'int'
+// CXX_INT-NEXT: | | |-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] <line:42:1> 'int (*)(int)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | | `-DeclRefExpr [[ADDR_13]] <col:1> 'int (int)' Function [[ADDR_14]] 'also_before[implementation={extension(disable_implicit_base)}]' 'int (int)'
+// CXX_INT-NEXT: | | `-ImplicitCastExpr [[ADDR_70:0x[a-z0-9]*]] <line:67:55> 'int' <FloatingToIntegral>
+// CXX_INT-NEXT: | | `-FloatingLiteral [[ADDR_67]] <col:55> 'float' 2.000000e+00
+// CXX_INT-NEXT: | `-CallExpr [[ADDR_71:0x[a-z0-9]*]] <col:63, col:77> 'int'
+// CXX_INT-NEXT: | |-ImplicitCastExpr [[ADDR_72:0x[a-z0-9]*]] <col:63> 'int (*)(double)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | | `-DeclRefExpr [[ADDR_73:0x[a-z0-9]*]] <col:63> 'int (double)' {{.*}}Function [[ADDR_32]] 'also_after' 'int (double)'
+// CXX_INT-NEXT: | `-FloatingLiteral [[ADDR_74:0x[a-z0-9]*]] <col:74> 'double' 3.000000e+00
+// CXX_INT-NEXT: `-CallExpr [[ADDR_75:0x[a-z0-9]*]] <col:81, col:94> 'int'
+// CXX_INT-NEXT: |-ImplicitCastExpr [[ADDR_76:0x[a-z0-9]*]] <col:81> 'int (*)(long)' <FunctionToPointerDecay>
+// CXX_INT-NEXT: | `-DeclRefExpr [[ADDR_77:0x[a-z0-9]*]] <col:81> 'int (long)' {{.*}}Function [[ADDR_37]] 'also_after' 'int (long)'
+// CXX_INT-NEXT: `-IntegerLiteral [[ADDR_78:0x[a-z0-9]*]] <col:92> 'long' 4
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
index 9ad7efff6ef5..821362c35826 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
@@ -1118,6 +1118,7 @@ __OMP_TRAIT_SELECTOR(implementation, extension, true)
__OMP_TRAIT_PROPERTY(implementation, extension, match_all)
__OMP_TRAIT_PROPERTY(implementation, extension, match_any)
__OMP_TRAIT_PROPERTY(implementation, extension, match_none)
+__OMP_TRAIT_PROPERTY(implementation, extension, disable_implicit_base)
__OMP_TRAIT_SET(user)
More information about the llvm-commits
mailing list