Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()

set(_DXC_ENFORCED_POLICIES
CMP0051 # Include_DIRECTORIES target scope
CMP0056 # Honor per-config link flags
CMP0063 # Visibility presets for targets
CMP0077 # option() honors normal variables
)
foreach(_policy IN LISTS _DXC_ENFORCED_POLICIES)
if(POLICY ${_policy})
cmake_policy(SET ${_policy} NEW)
endif()
endforeach()
unset(_DXC_ENFORCED_POLICIES)

if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
Expand Down
13 changes: 13 additions & 0 deletions tools/clang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ else()
endif()
endif()

set(_CLANG_ENFORCED_POLICIES
CMP0051
CMP0056
CMP0063
CMP0077
)
foreach(_policy IN LISTS _CLANG_ENFORCED_POLICIES)
if(POLICY ${_policy})
cmake_policy(SET ${_policy} NEW)
endif()
endforeach()
unset(_CLANG_ENFORCED_POLICIES)

# If we are not building as a part of LLVM, build Clang as an
# standalone project, using LLVM as an external library:
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
Expand Down
6 changes: 4 additions & 2 deletions tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//

#include "clang/Rewrite/Frontend/ASTConsumers.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Attr.h"
Expand All @@ -20,8 +19,10 @@
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Lex/Lexer.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Rewrite/Frontend/ASTConsumers.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringExtras.h"
Expand Down Expand Up @@ -483,7 +484,8 @@ namespace {
result = Context->getObjCIdType();
FunctionProtoType::ExtProtoInfo fpi;
fpi.Variadic = variadic;
return Context->getFunctionType(result, args, fpi);
return Context->getFunctionType(
result, args, fpi, llvm::ArrayRef<hlsl::ParameterModifier>());
}

// Helper function: create a CStyleCastExpr with trivial type source info.
Expand Down
Loading