summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/Sema.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r--include/clang/Sema/Sema.h78
1 files changed, 55 insertions, 23 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index cb75b96..72a0e0b 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -277,7 +277,9 @@ class Sema {
// it will keep having external linkage. If it has internal linkage, we
// will not link it. Since it has no previous decls, it will remain
// with internal linkage.
- return isVisible(Old) || New->isExternallyVisible();
+ if (getLangOpts().ModulesHideInternalLinkage)
+ return isVisible(Old) || New->isExternallyVisible();
+ return true;
}
public:
@@ -700,9 +702,15 @@ public:
/// \brief The declaration of the Objective-C NSNumber class.
ObjCInterfaceDecl *NSNumberDecl;
+ /// \brief The declaration of the Objective-C NSValue class.
+ ObjCInterfaceDecl *NSValueDecl;
+
/// \brief Pointer to NSNumber type (NSNumber *).
QualType NSNumberPointer;
+ /// \brief Pointer to NSValue type (NSValue *).
+ QualType NSValuePointer;
+
/// \brief The Objective-C NSNumber methods used to create NSNumber literals.
ObjCMethodDecl *NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods];
@@ -715,6 +723,9 @@ public:
/// \brief The declaration of the stringWithUTF8String: method.
ObjCMethodDecl *StringWithUTF8StringMethod;
+ /// \brief The declaration of the valueWithBytes:objCType: method.
+ ObjCMethodDecl *ValueWithBytesObjCTypeMethod;
+
/// \brief The declaration of the Objective-C NSArray class.
ObjCInterfaceDecl *NSArrayDecl;
@@ -1679,6 +1690,7 @@ public:
bool TypeMayContainAuto);
void ActOnUninitializedDecl(Decl *dcl, bool TypeMayContainAuto);
void ActOnInitializerError(Decl *Dcl);
+ void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc);
void ActOnCXXForRangeDecl(Decl *D);
StmtResult ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc,
IdentifierInfo *Ident,
@@ -2976,7 +2988,7 @@ public:
bool SynthesizeProperties);
/// Diagnose any null-resettable synthesized setters.
- void diagnoseNullResettableSynthesizedSetters(ObjCImplDecl *impDecl);
+ void diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl);
/// DefaultSynthesizeProperties - This routine default synthesizes all
/// properties which must be synthesized in the class's \@implementation.
@@ -5025,9 +5037,9 @@ public:
/// BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the
/// '@' prefixed parenthesized expression. The type of the expression will
- /// either be "NSNumber *" or "NSString *" depending on the type of
- /// ValueType, which is allowed to be a built-in numeric type or
- /// "char *" or "const char *".
+ /// either be "NSNumber *", "NSString *" or "NSValue *" depending on the type
+ /// of ValueType, which is allowed to be a built-in numeric type, "char *",
+ /// "const char *" or C structure with attribute 'objc_boxable'.
ExprResult BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr);
ExprResult BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr,
@@ -7603,6 +7615,12 @@ private:
bool IsOpenMPCapturedVar(VarDecl *VD);
public:
+ /// \brief Check if the specified variable is used in one of the private
+ /// clauses in OpenMP constructs.
+ /// \param Level Relative level of nested OpenMP construct for that the check
+ /// is performed.
+ bool isOpenMPPrivateVar(VarDecl *VD, unsigned Level);
+
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc,
Expr *Op);
/// \brief Called on start of new data sharing attribute block.
@@ -7610,9 +7628,9 @@ public:
const DeclarationNameInfo &DirName, Scope *CurScope,
SourceLocation Loc);
/// \brief Start analysis of clauses.
- void StartOpenMPClauses();
+ void StartOpenMPClause(OpenMPClauseKind K);
/// \brief End analysis of clauses.
- void EndOpenMPClauses();
+ void EndOpenMPClause();
/// \brief Called on end of data sharing attribute block.
void EndOpenMPDSABlock(Stmt *CurDirective);
@@ -7646,12 +7664,10 @@ public:
///
/// \returns Statement for finished OpenMP region.
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef<OMPClause *> Clauses);
- StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind,
- const DeclarationNameInfo &DirName,
- ArrayRef<OMPClause *> Clauses,
- Stmt *AStmt,
- SourceLocation StartLoc,
- SourceLocation EndLoc);
+ StmtResult ActOnOpenMPExecutableDirective(
+ OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName,
+ OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses,
+ Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc);
/// \brief Called on well-formed '\#pragma omp parallel' after parsing
/// of the associated statement.
StmtResult ActOnOpenMPParallelDirective(ArrayRef<OMPClause *> Clauses,
@@ -7757,6 +7773,15 @@ public:
StmtResult ActOnOpenMPTeamsDirective(ArrayRef<OMPClause *> Clauses,
Stmt *AStmt, SourceLocation StartLoc,
SourceLocation EndLoc);
+ /// \brief Called on well-formed '\#pragma omp cancellation point'.
+ StmtResult
+ ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc,
+ SourceLocation EndLoc,
+ OpenMPDirectiveKind CancelRegion);
+ /// \brief Called on well-formed '\#pragma omp cancel'.
+ StmtResult ActOnOpenMPCancelDirective(SourceLocation StartLoc,
+ SourceLocation EndLoc,
+ OpenMPDirectiveKind CancelRegion);
OMPClause *ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind,
Expr *Expr,
@@ -7851,13 +7876,13 @@ public:
OMPClause *ActOnOpenMPSeqCstClause(SourceLocation StartLoc,
SourceLocation EndLoc);
- OMPClause *
- ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef<Expr *> Vars,
- Expr *TailExpr, SourceLocation StartLoc,
- SourceLocation LParenLoc, SourceLocation ColonLoc,
- SourceLocation EndLoc,
- CXXScopeSpec &ReductionIdScopeSpec,
- const DeclarationNameInfo &ReductionId);
+ OMPClause *ActOnOpenMPVarListClause(
+ OpenMPClauseKind Kind, ArrayRef<Expr *> Vars, Expr *TailExpr,
+ SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation ColonLoc, SourceLocation EndLoc,
+ CXXScopeSpec &ReductionIdScopeSpec,
+ const DeclarationNameInfo &ReductionId, OpenMPDependClauseKind DepKind,
+ SourceLocation DepLoc);
/// \brief Called on well-formed 'private' clause.
OMPClause *ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList,
SourceLocation StartLoc,
@@ -7914,6 +7939,12 @@ public:
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
+ /// \brief Called on well-formed 'depend' clause.
+ OMPClause *
+ ActOnOpenMPDependClause(OpenMPDependClauseKind DepKind, SourceLocation DepLoc,
+ SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
+ SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation EndLoc);
/// \brief The kind of conversion being performed.
enum CheckedConversionKind {
@@ -8711,6 +8742,7 @@ private:
bool SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall,
int ArgNum, unsigned ExpectedFieldNum,
bool AllowName);
+ bool SemaBuiltinCpuSupports(CallExpr *TheCall);
public:
enum FormatStringType {
FST_Scanf,
@@ -8840,9 +8872,9 @@ private:
mutable IdentifierInfo *Ident___float128;
/// Nullability type specifiers.
- IdentifierInfo *Ident___nonnull = nullptr;
- IdentifierInfo *Ident___nullable = nullptr;
- IdentifierInfo *Ident___null_unspecified = nullptr;
+ IdentifierInfo *Ident__Nonnull = nullptr;
+ IdentifierInfo *Ident__Nullable = nullptr;
+ IdentifierInfo *Ident__Null_unspecified = nullptr;
IdentifierInfo *Ident_NSError = nullptr;
OpenPOWER on IntegriCloud