"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/clang/Lex/MacroArgs.h" between
cfe-8.0.1.src.tar.xz and cfe-9.0.0.src.tar.xz

About: Clang is an LLVM front end for the C, C++, and Objective-C languages. Clang aims to provide a better user experience through expressive diagnostics, a high level of conformance to language standards, fast compilation, and low memory use.

MacroArgs.h  (cfe-8.0.1.src.tar.xz):MacroArgs.h  (cfe-9.0.0.src.tar.xz)
//===--- MacroArgs.h - Formal argument info for Macros ----------*- C++ -*-===// //===--- MacroArgs.h - Formal argument info for Macros ----------*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// // See https://llvm.org/LICENSE.txt for license information.
// This file is distributed under the University of Illinois Open Source // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// License. See LICENSE.TXT for details.
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// //
// This file defines the MacroArgs interface. // This file defines the MacroArgs interface.
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LEX_MACROARGS_H #ifndef LLVM_CLANG_LEX_MACROARGS_H
#define LLVM_CLANG_LEX_MACROARGS_H #define LLVM_CLANG_LEX_MACROARGS_H
skipping to change at line 116 skipping to change at line 115
unsigned getNumMacroArguments() const { return NumMacroArgs; } unsigned getNumMacroArguments() const { return NumMacroArgs; }
/// isVarargsElidedUse - Return true if this is a C99 style varargs macro /// isVarargsElidedUse - Return true if this is a C99 style varargs macro
/// invocation and there was no argument specified for the "..." argument. If /// invocation and there was no argument specified for the "..." argument. If
/// the argument was specified (even empty) or this isn't a C99 style varargs /// the argument was specified (even empty) or this isn't a C99 style varargs
/// function, or if in strict mode and the C99 varargs macro had only a ... /// function, or if in strict mode and the C99 varargs macro had only a ...
/// argument, this returns false. /// argument, this returns false.
bool isVarargsElidedUse() const { return VarargsElided; } bool isVarargsElidedUse() const { return VarargsElided; }
/// Returns true if the macro was defined with a variadic (ellipsis) parameter /// Returns true if the macro was defined with a variadic (ellipsis) parameter
/// AND was invoked with at least one token supplied as a variadic argument. /// AND was invoked with at least one token supplied as a variadic argument
/// (after pre-expansion).
/// ///
/// \code /// \code
/// #define F(a) a /// #define F(a) a
/// #define V(a, ...) __VA_OPT__(a) /// #define V(a, ...) __VA_OPT__(a)
/// F() <-- returns false on this invocation. /// F() <-- returns false on this invocation.
/// V(,a) <-- returns true on this invocation. /// V(,a) <-- returns true on this invocation.
/// V(,) <-- returns false on this invocation. /// V(,) <-- returns false on this invocation.
/// V(,F()) <-- returns false on this invocation.
/// \endcode /// \endcode
/// ///
bool invokedWithVariadicArgument(const MacroInfo *const MI, Preprocessor &PP);
bool invokedWithVariadicArgument(const MacroInfo *const MI) const;
/// StringifyArgument - Implement C99 6.10.3.2p2, converting a sequence of /// StringifyArgument - Implement C99 6.10.3.2p2, converting a sequence of
/// tokens into the literal string token that should be produced by the C # /// tokens into the literal string token that should be produced by the C #
/// preprocessor operator. If Charify is true, then it should be turned into /// preprocessor operator. If Charify is true, then it should be turned into
/// a character literal for the Microsoft charize (#@) extension. /// a character literal for the Microsoft charize (#@) extension.
/// ///
static Token StringifyArgument(const Token *ArgToks, static Token StringifyArgument(const Token *ArgToks,
Preprocessor &PP, bool Charify, Preprocessor &PP, bool Charify,
SourceLocation ExpansionLocStart, SourceLocation ExpansionLocStart,
SourceLocation ExpansionLocEnd); SourceLocation ExpansionLocEnd);
 End of changes. 4 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)